Ver código fonte

ERx - UX enhancements

Vijayakrishnan 3 anos atrás
pai
commit
7aa6a915d9

+ 3 - 3
js-dev/stag-suggest.js

@@ -145,7 +145,7 @@
                     return false;
                 case 13:
                     if (activeItem.length) {
-                        activeItem.first().click();
+                        activeItem.first().trigger('mousedown');
                     }
                     return false;
                 default:
@@ -210,8 +210,8 @@
         });
 
         // on auto-suggest selection
-        $(document).off('click', '.suggest-item.stag-suggest');
-        $(document).on('click', '.suggest-item.stag-suggest', function () {
+        $(document).off('mousedown.stag-suggest', '.suggest-item.stag-suggest');
+        $(document).on('mousedown.stag-suggest', '.suggest-item.stag-suggest', function () {
 
             $('.suggestions-outer.stag-suggestions').addClass('d-none');
 

+ 10 - 4
resources/views/app/patient/prescriptions/list.blade.php

@@ -1452,7 +1452,8 @@ GROUP BY erx_category");
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 // nothing to do
-                                fastReload();
+                                // fastReload();
+                                hideMask();
                             }
                         }, 'json');
                     },
@@ -1464,6 +1465,8 @@ GROUP BY erx_category");
                         this.currentPrescription = null;
                         this.currentPrescription = temp;
 
+                        showMask();
+
                         // save erx
                         $.post('/api/erx/updateClinicalDetail', {
                             uid: this.currentPrescription.uid,
@@ -1471,7 +1474,8 @@ GROUP BY erx_category");
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 // nothing to do
-                                fastReload();
+                                // fastReload();
+                                hideMask();
                             }
                         }, 'json');
                     },
@@ -1560,7 +1564,7 @@ GROUP BY erx_category");
 
                                         $.post(form.attr('action'), form.serialize(), _data => {
                                             if (!hasResponseError(_data)) {
-                                                hideMask();
+
                                                 // refreshDynamicStagPopup();
                                                 // $('.visit-segment[data-segment-template-name="intake_medications"]').find('.refresh-segment').trigger('click');
 
@@ -1585,7 +1589,9 @@ GROUP BY erx_category");
                                                 }, _data => {
                                                     if(!hasResponseError(_data)) {
                                                         // nothing to do
-                                                        fastReload();
+                                                        // fastReload();
+                                                        hideMask();
+                                                        form[0].reset();
                                                     }
                                                 }, 'json');