Просмотр исходного кода

Note: refresh rhs only on popup close

Vijayakrishnan Krishnan 1 неделя назад
Родитель
Сommit
52e4d23246

+ 1 - 1
config/debugbar.php

@@ -14,7 +14,7 @@ return [
      |
      */
 
-    'enabled' => env('DEBUGBAR_ENABLED', null),
+    'enabled' => env('DEBUGBAR_ENABLED', false),
     'except' => [
         'telescope*',
         'horizon*',

+ 5 - 0
resources/views/app/patient/note/dashboard.blade.php

@@ -1455,6 +1455,7 @@ use App\Models\Handout;
                              mc-initer="medications-center-{{$note->id}}"
                              title="Medications Center"
                              popup-style="overflow-visible"
+                             update-parent="refreshRHSSidebar"
                              href="/medications-center/{{$patient->uid}}/{{$note->uid}}">
                             <i class="fa fa-bolt mr-1"></i>
                             <span>Rx</span>
@@ -1467,6 +1468,7 @@ use App\Models\Handout;
                              mc-initer="problems-center-{{$note->id}}"
                              title="Problems Center"
                              popup-style="overflow-visible"
+                             update-parent="refreshRHSSidebar"
                              href="/problems-center/{{$patient->uid}}/{{$note->uid}}">
                             <i class="fa fa-bolt mr-1"></i>
                             <span>Dx</span>
@@ -1479,6 +1481,7 @@ use App\Models\Handout;
                              mc-initer="goals-center-{{$note->id}}"
                              title="Goals Center"
                              popup-style="overflow-visible"
+                             update-parent="refreshRHSSidebar"
                              href="/goals-center/{{$patient->uid}}/{{$note->uid}}">
                             <i class="fa fa-bolt mr-1"></i>
                             <span>Goals</span>
@@ -1491,6 +1494,7 @@ use App\Models\Handout;
                              mc-initer="allergies-center-{{$note->id}}"
                              title="Allergies Center"
                              popup-style="overflow-visible"
+                             update-parent="refreshRHSSidebar"
                              href="/allergies-center/{{$patient->uid}}/{{$note->uid}}">
                             <i class="fa fa-bolt mr-1"></i>
                             <span>Allergies</span>
@@ -1503,6 +1507,7 @@ use App\Models\Handout;
                              mc-initer="careteam-center-{{$note->id}}"
                              title="Care Team Center"
                              popup-style="overflow-visible"
+                             update-parent="refreshRHSSidebar"
                              href="/careteam-center/{{$patient->uid}}/{{$note->uid}}">
                             <i class="fa fa-bolt mr-1"></i>
                             <span>Care Team</span>

+ 1 - 1
resources/views/app/patient/note/rhs-sidebar-nrc.blade.php

@@ -1,4 +1,4 @@
-<div class="note-rhs-sidebar screen-only pb-5" id="note-rhs-sidebar">
+<div class="note-rhs-sidebar screen-only pb-5 nrc" id="note-rhs-sidebar">
 
     <?php
     $cmStartDate = date('Y-m-01', strtotime($note->effective_dateest));

+ 7 - 1
resources/views/app/patient/note/rhs-sidebar.blade.php

@@ -1,4 +1,4 @@
-<div class="note-rhs-sidebar screen-only pb-5" id="note-rhs-sidebar">
+<div class="note-rhs-sidebar screen-only pb-5 non-nrc" id="note-rhs-sidebar">
 
     <?php
     $cmStartDate = date('Y-m-01', strtotime($note->effective_dateest));
@@ -69,6 +69,7 @@
          mc-initer="allergies-center-{{$note->id}}"
          title="Allergies Center"
          popup-style="overflow-visible"
+         update-parent="refreshRHSSidebar"
          href="/allergies-center/{{$patient->uid}}/{{$note->uid}}">
         <div class="font-weight-bold mb-2">
             Allergies
@@ -100,6 +101,7 @@
          mc-initer="medications-center-{{$note->id}}"
          title="Medications Center"
          popup-style="overflow-visible"
+         update-parent="refreshRHSSidebar"
          href="/medications-center/{{$patient->uid}}/{{$note->uid}}">
         <div class="font-weight-bold mb-2">
             Medications
@@ -139,6 +141,7 @@
          mc-initer="problems-center-{{$note->id}}"
          title="Problems Center"
          popup-style="overflow-visible"
+         update-parent="refreshRHSSidebar"
          href="/problems-center/{{$patient->uid}}/{{$note->uid}}">
         <div class="font-weight-bold mb-2">
             Problems
@@ -164,6 +167,7 @@
          mc-initer="goals-center-{{$note->id}}"
          title="Goals Center"
          popup-style="overflow-visible"
+         update-parent="refreshRHSSidebar"
          href="/goals-center/{{$patient->uid}}/{{$note->uid}}">
         <div class="font-weight-bold mb-2">
             Goals
@@ -187,6 +191,7 @@
          mc-initer="careteam-center-{{$note->id}}"
          title="Care Team Center"
          popup-style="overflow-visible"
+         update-parent="refreshRHSSidebar"
          href="/careteam-center/{{$patient->uid}}/{{$note->uid}}">
         <div class="font-weight-bold">
             Care Team
@@ -237,6 +242,7 @@
          mc-initer="surveys-center-{{$note->id}}"
          title="Surveys"
          popup-style="overflow-visible"
+         update-parent="refreshRHSSidebar"
          href="/patients/view/{{$patient->uid}}/surveys?popup=1">
         <div class="font-weight-bold mb-2">
             Surveys

+ 7 - 0
resources/views/app/patient/note/segment_script.blade.php

@@ -91,6 +91,11 @@
         }
 
         window.refreshRHSSidebar = function() {
+            // this function no longer refreshes the rhs sidebar
+            // kept here only so that callers don't err out
+        };
+
+        window.refreshRHSSidebarActual = function() {
             let noteRHSSidebar = $('#note-rhs-sidebar');
             if(noteRHSSidebar.length) {
                 let lastUpdatedAt = noteRHSSidebar.attr('last-updated-at');
@@ -112,6 +117,8 @@
             }
         };
 
+        addMCHook('refreshRHSSidebar', refreshRHSSidebarActual);
+
         window.updateSegmentByUid = function(_uid, _summaryHtml, _editHtml, _updateOnlySummary) {
             let segment = $('.note-section[data-segment-uid="' + _uid + '"]');
             if(segment && segment.length) {