Pārlūkot izejas kodu

Fix action of section-close button

Vijayakrishnan Krishnan 4 gadi atpakaļ
vecāks
revīzija
475db4ed52
1 mainītis faili ar 17 papildinājumiem un 16 dzēšanām
  1. 17 16
      resources/views/app/patient/note/dashboard.blade.php

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

@@ -569,22 +569,23 @@
                     });
 
                 $('.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');
+                    // $.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;
                 });