Browse Source

Tickets v1 - Auto-close after "Mark Complete"

Vijayakrishnan 4 years ago
parent
commit
73aff79fc7
1 changed files with 5 additions and 2 deletions
  1. 5 2
      resources/views/app/patient/tickets.blade.php

+ 5 - 2
resources/views/app/patient/tickets.blade.php

@@ -459,7 +459,7 @@
                         },
 
                         // common
-                        reloadPopupItem: function(_type) {
+                        reloadPopupItem: function(_type, _close = false) {
                             this.reloading = true;
                             $.get('/get-ticket/' + this[_type + 'PopupItem'].uid, (_data) => {
                                 this[_type + 'PopupItem'] = _data;
@@ -474,6 +474,9 @@
 
                                 Vue.nextTick(() => {
                                     this.reloading = false;
+                                    if(_close) {
+                                        closeStagPopup();
+                                    }
                                 });
 
                             }, 'json');
@@ -482,7 +485,7 @@
                             $.post('/api/ticket/close', {
                                 uid: _item.uid
                             }, (_data) => {
-                                this.reloadPopupItem(this.currentCategory);
+                                this.reloadPopupItem(this.currentCategory, true);
                             }, 'json');
                         },
                         openItem: function(_item) {