Jelajahi Sumber

Disallow favoriting empty items (title empty)

Vijayakrishnan 4 tahun lalu
induk
melakukan
3a1220168c

+ 1 - 0
resources/views/app/patient/canvas-sections/allergies/form.blade.php

@@ -233,6 +233,7 @@ $formID = rand(0, 100000);
                         return matches.length ? matches[0].uid : false;
                     },
                     addToFavorites: function(_item) {
+                        if(!_item.title || !$.trim(_item.title)) return;
                         if(this.isFavorite(_item)) return;
                         let self = this;
                         $.post('/api/proFavorite/create', {

+ 1 - 0
resources/views/app/patient/canvas-sections/dx/form.blade.php

@@ -349,6 +349,7 @@ $formID = rand(0, 100000);
                         return matches.length ? matches[0].uid : false;
                     },
                     addToFavorites: function(_item) {
+                        if(!_item.title || !$.trim(_item.title)) return;
                         if(this.isFavorite(_item)) return;
                         let self = this;
                         $.post('/api/proFavorite/create', {

+ 1 - 0
resources/views/app/patient/canvas-sections/rx/form.blade.php

@@ -283,6 +283,7 @@ $formID = rand(0, 100000);
                         return matches.length ? matches[0].uid : false;
                     },
                     addToFavorites: function(_item) {
+                        if(!_item.title || !$.trim(_item.title)) return;
                         if(this.isFavorite(_item)) return;
                         let self = this;
                         $.post('/api/proFavorite/create', {