|
@@ -19,15 +19,19 @@
|
|
<th> </th>
|
|
<th> </th>
|
|
<th>NoteTemplate</th>
|
|
<th>NoteTemplate</th>
|
|
<th></th>
|
|
<th></th>
|
|
|
|
+ <th></th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody class="sortable" data-url="/api/noteTemplatePro/sort">
|
|
<tbody class="sortable" data-url="/api/noteTemplatePro/sort">
|
|
@foreach($subRecords as $subRecord)
|
|
@foreach($subRecords as $subRecord)
|
|
- <tr data-uid="{{$subRecord->uid}}">
|
|
|
|
- <td><a href=""><i class="fas fa-share-square"></i></a></td>
|
|
|
|
- <td><?= value_from_rs($result_note_templates, 'title', [['id', '=', $subRecord->note_template_id],], 'all'); ?></td>
|
|
|
|
- <td><a href=""><i class="fa fa-bars"></i></a></td>
|
|
|
|
- </tr>
|
|
|
|
|
|
+ @if(!$subRecord->is_removed)
|
|
|
|
+ <tr data-uid="{{$subRecord->uid}}">
|
|
|
|
+ <td><a href=""><i class="fas fa-share-square"></i></a></td>
|
|
|
|
+ <td><?= value_from_rs($result_note_templates, 'title', [['id', '=', $subRecord->note_template_id],], 'all'); ?></td>
|
|
|
|
+ <td><a href=""><i class="fa fa-bars"></i></a></td>
|
|
|
|
+ <td><a href="#" onclick="return deleteNoteTemplate('{{$subRecord->uid}}')" class="text-danger">Remove</a></td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endif
|
|
@endforeach
|
|
@endforeach
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
@@ -35,4 +39,21 @@
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-@endsection
|
|
|
|
|
|
+<script>
|
|
|
|
+ function deleteNoteTemplate(_uid) {
|
|
|
|
+ if(confirm('Are you sure?')) {
|
|
|
|
+ $.post('/api/noteTemplatePro/remove', {
|
|
|
|
+ uid: _uid
|
|
|
|
+ }, function(_data) {
|
|
|
|
+ if(_data && _data.success) {
|
|
|
|
+ window.location.reload();
|
|
|
|
+ }
|
|
|
|
+ else if(_data && _data.message) {
|
|
|
|
+ toastr.error(_data.message)
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+@endsection
|