|
@@ -246,10 +246,15 @@
|
|
</a>
|
|
</a>
|
|
<?php $sectionInternalName = $section->sectionTemplate->internal_name; ?>
|
|
<?php $sectionInternalName = $section->sectionTemplate->internal_name; ?>
|
|
@include('app/patient/note/_templates-index')
|
|
@include('app/patient/note/_templates-index')
|
|
|
|
+ <?php
|
|
|
|
+ if(file_exists(storage_path('sections/' . $sectionInternalName . '/actions.php'))) {
|
|
|
|
+ include(storage_path('sections/' . $sectionInternalName . '/actions.php'));
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
<a href="#" class="d-none text-danger if-edit ml-auto remove-section-trigger"
|
|
<a href="#" class="d-none text-danger if-edit ml-auto remove-section-trigger"
|
|
data-uid="{{$section->uid}}"
|
|
data-uid="{{$section->uid}}"
|
|
title="Remove {{$section->sectionTemplate->title}}">
|
|
title="Remove {{$section->sectionTemplate->title}}">
|
|
- <i class="fa fa-times-circle"></i>
|
|
|
|
|
|
+ Remove {{$section->sectionTemplate->title}}
|
|
</a>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="d-none if-not-edit inset-comment">{!! !empty($section->summary_html) ? $section->summary_html : '-' !!}</div>
|
|
<div class="d-none if-not-edit inset-comment">{!! !empty($section->summary_html) ? $section->summary_html : '-' !!}</div>
|
|
@@ -570,23 +575,23 @@
|
|
});
|
|
});
|
|
|
|
|
|
$('.remove-section-trigger').click(function() {
|
|
$('.remove-section-trigger').click(function() {
|
|
- // $.post('/api/section/deactivate', {
|
|
|
|
- // uid: $(this).attr('data-uid'),
|
|
|
|
- // memo: 'Deactivated from note',
|
|
|
|
- // }, function(_data) {
|
|
|
|
- // if(_data) {
|
|
|
|
- // if(_data.success) {
|
|
|
|
- // fastReload();
|
|
|
|
- // }
|
|
|
|
- // else {
|
|
|
|
- // toastr.error(_data.message);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // else {
|
|
|
|
- // toastr.error('Unable to remove section!');
|
|
|
|
- // }
|
|
|
|
- // }, 'json');
|
|
|
|
- $(this).closest('.note-section').removeClass('edit');
|
|
|
|
|
|
+ $.post('/api/section/deactivate', {
|
|
|
|
+ uid: $(this).attr('data-uid'),
|
|
|
|
+ memo: 'Deactivated from note',
|
|
|
|
+ }, function(_data) {
|
|
|
|
+ if(_data) {
|
|
|
|
+ if(_data.success) {
|
|
|
|
+ fastReload();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ toastr.error(_data.message);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ toastr.error('Unable to remove section!');
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
|
|
+ // $(this).closest('.note-section').removeClass('edit');
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
|