Browse Source

fixed hiding toggle edit button for guests

Josh 4 năm trước cách đây
mục cha
commit
2e0a8f8b02

+ 0 - 1
resources/views/app/guest/section.blade.php

@@ -7,5 +7,4 @@ $latestSectionTS = 0;
 ?>
 ?>
 @include('app.patient.note.section')
 @include('app.patient.note.section')
 @include('app.patient.note.section_script')
 @include('app.patient.note.section_script')
-@include('app.patient.note.dashboard_script')
 @endsection
 @endsection

+ 17 - 11
resources/views/app/patient/note/section.blade.php

@@ -10,16 +10,18 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
     data-section-template-name="{{ $section->sectionTemplate->internal_name }}">
     data-section-template-name="{{ $section->sectionTemplate->internal_name }}">
     <div class="d-flex align-items-start">
     <div class="d-flex align-items-start">
         @if(!isset($note) || (isset($note) && !$note->is_signed_by_hcp))
         @if(!isset($note) || (isset($note) && !$note->is_signed_by_hcp))
-        <a class="font-weight-bold mb-2 d-flex align-items-center c-pointer">
-            {{$section->sectionTemplate->title}}
-            <span class="d-none if-not-edit"><i class="fa fa-edit ml-2"></i></span>
-            <span class="d-none if-edit edit-trigger"><i class="fa fa-times ml-2"></i></span>
-            <span class="edit-trigger"></span>
-        </a>
+            <a class="font-weight-bold mb-2 d-flex align-items-center c-pointer">
+                {{$section->sectionTemplate->title}}
+                @if(!isset($guestAccessCode))
+                    <span class="d-none if-not-edit"><i class="fa fa-edit ml-2"></i></span>
+                    <span class="d-none if-edit edit-trigger"><i class="fa fa-times ml-2"></i></span>
+                    <span class="edit-trigger"></span>
+                @endif
+            </a>
         @else
         @else
-        <span class="font-weight-bold mb-2 d-flex align-items-center">
-            {{$section->sectionTemplate->title}}
-        </span>
+            <span class="font-weight-bold mb-2 d-flex align-items-center">
+                {{$section->sectionTemplate->title}}
+            </span>
         @endif
         @endif
         <?php $sectionInternalName = $section->sectionTemplate->internal_name; ?>
         <?php $sectionInternalName = $section->sectionTemplate->internal_name; ?>
 
 
@@ -56,11 +58,14 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
             </a>
             </a>
         @endif
         @endif
     </div>
     </div>
-    <div class="d-none if-not-edit  inset-comment summary-container">
+    @if(!isset($guestAccessCode) || $section->guest_access_level == 'READ')
+    <div class="{{isset($guestAccessCode)?'':'d-none'}} if-not-edit  inset-comment summary-container">
         {!! !empty($section->summary_html) ? $section->summary_html : '-' !!}
         {!! !empty($section->summary_html) ? $section->summary_html : '-' !!}
     </div>
     </div>
+    @endif
 
 
-    <div class="d-none if-edit">
+    @if(!isset($guestAccessCode) || $section->guest_access_level == 'WRITE')
+    <div class="{{isset($guestAccessCode)?'':'d-none'}} if-edit">
 
 
         <?php
         <?php
         // if canvas
         // if canvas
@@ -106,4 +111,5 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
             <span class="ml-2 text-secondary text-sm text-saving d-none"><i>Saving ...</i></span>
             <span class="ml-2 text-secondary text-sm text-saving d-none"><i>Saving ...</i></span>
         </div>
         </div>
     </div>
     </div>
+    @endif
 </div>
 </div>