Explorar el Código

Billing manager - note stag-popup

Vijayakrishnan hace 4 años
padre
commit
474637c43d

+ 3 - 0
public/css/style.css

@@ -461,6 +461,9 @@ input.search_field, textarea.search_field {
     .navbar.navbar-dark+[role="main"] {
         padding-top: 55px;
     }
+    .stag-popup .navbar.navbar-dark+[role="main"] {
+        padding-top: 0;
+    }
 }
 .font-smaller {
     font-size: 11px !important;

+ 2 - 0
public/js/mc.js

@@ -23,6 +23,8 @@ $(document).ready(function () {
         }
     }
 
+    if(window.noMc) return;
+
     // window.top.ensureRHS();
     $(document).on('click', '.stag_rhs_toggle', function () {
         var state = window.top.toggleRHS(),

+ 31 - 9
resources/views/app/practice-management/billing-manager.blade.php

@@ -82,17 +82,12 @@
                     <tr>
                         <th class="border-0">Patient</th>
                         <th class="border-0">Note Eff. Date</th>
-
-
                         <th class="border-0">HCP</th>
-
                         <th class="border-0">Signed?</th>
                         <th class="border-0">Bills</th>
-
                         @if($performer->pro->pro_type == 'ADMIN')
                             <th class="border-0">Assessments</th>
                         @endif
-
                         @if($performer->pro->pro_type == 'ADMIN')
                             <th class="border-0">Claims</th>
                         @endif
@@ -102,13 +97,13 @@
                     <tbody>
                     @foreach ($notes as $note)
                         <tr class="{{ $note->is_cancelled ? 'cancelled-item always-clickable' : '' }}">
-
                             <td class="">
-                                <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}">{{ $note->client->displayName() }}</a>
+                                <a href="/patients/view/{{ $note->client->uid }}">{{ $note->client->displayName() }}</a>
                             </td>
                             <td class="">
-                                <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}"
-                                   class="font-weight-bold">
+                                <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}?popupmode=1"
+                                   native target="_blank"
+                                   class="font-weight-bold note-popup-trigger">
                                     {{ friendly_date_time($note->effective_dateest, false) }}
                                 </a>
                                 <span class="ml-1">{{ $note->is_cancelled ? '[cancelled]' : '' }}</span>
@@ -216,6 +211,19 @@
         </div>
     </div>
 
+    <div class="stag-popup stag-popup-lg mcp-theme-1" stag-popup-key="note-popup">
+        <form method="POST" action="" class="p-0">
+            <h3 class="stag-popup-title mb-0 mt-3 mx-3 pb-0 border-bottom-0">
+                <span>Note Details</span>
+                <a href="#" class="ml-auto text-secondary"
+                   onclick="return closeStagPopup()"><i class="fa fa-times-circle"></i></a>
+            </h3>
+            <div class="pb-3 note-popup-content">
+                <div class="px-3 pt-3 text-secondary font-italic">Loading ...</div>
+            </div>
+        </form>
+    </div>
+
     <script>
         (function() {
 
@@ -240,6 +248,20 @@
                 $('select[data-filter]')
                     .off('change')
                     .on('change', applyFilters);
+                $('.note-popup-trigger')
+                    .off('click')
+                    .on('click', function() {
+                        window.noMc = true;
+                        $.get(this.href, (_data) => {
+                            $('.note-popup-content').html(_data);
+                            $('.note-popup-content')
+                                .find('a, button, input, select')
+                                    .attr('disabled', 'disabled')
+                                    .css('pointer-events', 'none');
+                        });
+                        showStagPopup('note-popup');
+                        return false;
+                    });
             }
 
             addMCInitializer('practice-billing-manager', init, '#practice-billing-manager')

+ 1 - 0
resources/views/layouts/empty.blade.php

@@ -0,0 +1 @@
+@yield('content')

+ 4 - 2
resources/views/layouts/patient.blade.php

@@ -1,10 +1,11 @@
-@extends('layouts.template')
+@extends(request()->input('popupmode') ? 'layouts.empty' : 'layouts.template')
 <?php
 /** @var \App\Models\Client $patient */
 ?>
 @section('content')
     <div class="container-fluid h-100">
-        <div class="main-row h-100">
+        <div class="main-row h-100 {{ !request()->input('popupmode') ? '' : 'px-0' }}">
+            @if(!request()->input('popupmode'))
             <nav id="sidebarMenu" class="d-md-block bg-light sidebar collapse px-0">
                 <div class="sidebar-sticky pt-3">
                     <ul class="nav flex-column mcp-theme-1">
@@ -183,6 +184,7 @@
                     </div>
                 </div>
             </nav>
+            @endif
             <main role="main" class="w-100">
                 <div class="card mt-3">
                     <div class="card-header py-1">

+ 2 - 3
resources/views/layouts/template.blade.php

@@ -18,7 +18,7 @@
 
     {{-- Quill RTE --}}
     <script>
-        let stagQuillConfig = {
+        window.stagQuillConfig = {
             toolbar: ['bold', 'italic', 'underline', { 'list': 'ordered'}, { 'list': 'bullet' }],
             keyboard: {
                 bindings: {
@@ -307,8 +307,7 @@
     <script src="/js/option-list.js"></script>
     @include('app/pdf/viewer')
     <script>
-        let socket = new SockJS("{{ config('app.backend_ws_url') }}");
-        window.socketClient = Stomp.over(socket);
+        window.socketClient = Stomp.over(new SockJS("{{ config('app.backend_ws_url') }}"));
         window.socketClient.connect({}, (frame) => {
 
             window.socketClient.send("/app/register", {},     // register self