瀏覽代碼

Make hcp-signed notes readonly

Vijayakrishnan Krishnan 4 年之前
父節點
當前提交
85b47b7ec5
共有 3 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      public/css/style.css
  2. 2 2
      public/js/mc.js
  3. 1 1
      resources/views/app/patient/note/dashboard.blade.php

+ 1 - 1
public/css/style.css

@@ -197,7 +197,7 @@ body>nav.navbar {
     cursor: pointer;
     position: relative;
 }
-.note-content:not(.cancelled):not([auto-edit]):after {
+.note-content:not(.cancelled):not([auto-edit]):not(.readonly):after {
     content: 'Click to change';
     display: inline;
     color: #535353;

+ 2 - 2
public/js/mc.js

@@ -318,8 +318,8 @@ function initCreateNote() {
 function initQuillEdit(_selector = '.note-content[auto-edit]') {
 
     $(document)
-        .off('click.enable-edit', '.note-content:not([auto-edit])')
-        .on('click.enable-edit', '.note-content:not([auto-edit])', function() {
+        .off('click.enable-edit', '.note-content:not([auto-edit]):not(.readonly)')
+        .on('click.enable-edit', '.note-content:not([auto-edit]):not(.readonly)', function() {
             $(this).attr('auto-edit', 1);
             initQuillEdit();
             initPrimaryForm();

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

@@ -245,7 +245,7 @@
                 <div class="mb-3">
                     <div>
                         <div class="primary-form">
-                            <div class="note-content {{ $note->is_cancelled ? 'cancelled' : '' }}"
+                            <div class="note-content {{ $note->is_cancelled ? 'cancelled' : '' }} {{ $note->is_signed_by_hcp ? 'readonly' : '' }}"
                                  data-note-uid="{{ $note->uid  }}"
                                  {{ !$note->is_cancelled && empty($note->free_text_html) ? 'auto-edit' : '' }}>{!! $note->free_text_html !!}</div>
                         </div>