Ver Fonte

Disallow editing signed notes

Vijayakrishnan há 4 anos atrás
pai
commit
1dda9ead5e

+ 15 - 0
public/css/style.css

@@ -686,3 +686,18 @@ body .node input[type="number"] {
     width: 100%;
     height: 100%;
 }
+.signed-note {
+    position: relative;
+    pointer-events: none !important;
+}
+.signed-note::after {
+    content: '';
+    position: absolute;
+    z-index: 2;
+    cursor: not-allowed;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    background: rgba(0,0,0,0.01);
+}

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

@@ -214,7 +214,9 @@
                             $latestSectionTS = $sectionTS;
                         }
                         ?>
-                        <div data-ts={{$sectionTS}} class="p-3 border-bottom note-section {{ $section->is_initialized ? '' : 'pending-initialization' }}"
+                        <div data-ts="{{$sectionTS}}"
+                             class="p-3 border-bottom note-section {{ $note->is_signed_by_hcp ? 'signed-note' : '' }} {{ $section->is_initialized ? '' : 'pending-initialization' }}"
+                             {!! $note->is_signed_by_hcp ? 'title="Signed note. Cannot be edited further."' : '' !!}
                              data-section-uid="{{ $section->uid }}"
                              data-section-template-uid="{{ $section->sectionTemplate->uid }}"
                              data-section-template-name="{{ $section->sectionTemplate->internal_name }}">
@@ -791,6 +793,7 @@
 @endsection
 
 @section('left-nav-content')
+    @if(!$note->is_signed_by_hcp)
     <div class="left-nav-content" id="note-sections-app">
         <div class="note-widget-title px-2 py-1">Note Sections</div>
         <input type="search" class="d-block w-100 border-0 outline-0 px-2 py-1"
@@ -889,4 +892,5 @@
             addMCInitializer('sections-widget', initSectionsWidget);
         })();
     </script>
+    @endif
 @endsection