Browse Source

Merge branch 'dev-vj-notes' of rav.triplestart.com:jmudaka/stagfe2 into dev-josh-notes

= 3 years ago
parent
commit
eec8550e75

+ 15 - 4
resources/views/app/patient/note/dashboard.blade.php

@@ -10,14 +10,17 @@
 
     <?php
     $hasBills = false;
-    if($note->bills->count()) {
+    if ($note->bills->count()) {
         foreach ($note->bills as $bill) {
-            if(!$bill->is_cancelled) {
+            if (!$bill->is_cancelled) {
                 $hasBills = true;
                 break;
             }
         }
     }
+
+    // is based on visit template
+    $isVisitTemplateBased = !!$note->visitTemplate;
     ?>
 
     {{--
@@ -434,6 +437,7 @@
         </div>
         <div class="card-body p-0">
             <div class="note-container">
+                @if($isVisitTemplateBased)
                 <div class="note-lhs-tree" id="note-lhs-tree">
                     <?php
                     $previousHeading = null;
@@ -477,6 +481,7 @@
                     }
                     ?>
                 </div>
+                @endif
                 <div class="note-rhs-content">
             <div>
                 <div class="">
@@ -503,7 +508,11 @@
                         $latestSectionTS = 0;
                         ?>
                         <div class="{{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }}">
-                            @include('app.patient.note.note-segment-list')
+                            @if($isVisitTemplateBased)
+                                @include('app.patient.note.note-segment-list')
+                            @else
+                                @include('app.patient.note.note-section-list')
+                            @endif
                         </div>
                     </div>
                 </div>
@@ -2218,7 +2227,8 @@
     <div class="note-templates-underlay"></div>
     @include('app.patient.note.dashboard_script')
     @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'rx', 'class' => 'wide', 'noEditLink' => true])
-        <script>
+    @if($isVisitTemplateBased)
+    <script>
         (function() {
             function init() {
                 fixTreeTopAndHeight();
@@ -2259,4 +2269,5 @@
             addMCInitializer('note-tree', init, '#note-lhs-tree');
         })();
     </script>
+    @endif
 @endsection

+ 4 - 2
resources/views/app/patient/note/dashboard_script.blade.php

@@ -289,7 +289,8 @@
                     return false;
                 });
 
-                /*$(document)
+                @if(!$note->visitTemplate)
+                $(document)
                     .off('mousedown.enable-edit', '.note-section:not(.edit):not(.page-driven)')
                     .on('mousedown.enable-edit', '.note-section:not(.edit):not(.page-driven)', function(e) {
                         if($(this).closest('.note-signed-by-hcp').length) return;
@@ -297,7 +298,8 @@
                         e.preventDefault();
                         $(this).find('.edit-trigger').first().click();
                         return false;
-                    });*/
+                    });
+                @endif
 
                 // $(document)
                 //     .off('mousedown.enable-edit', '.note-section:not(.edit).page-driven')