logicpowerhouse 5 år sedan
förälder
incheckning
5c99a95883
2 ändrade filer med 7 tillägg och 3 borttagningar
  1. 6 2
      public/js/yemi.js
  2. 1 1
      resources/views/layouts/patient.blade.php

+ 6 - 2
public/js/yemi.js

@@ -89,7 +89,8 @@ var doAjax = function (url, data, pre, post, onSuccess, onFailure, suppressError
                 }
                 if (!suppressErrorMessage) {
                     //toast the error message
-                    alert(response.message);
+                    //alert(response.message);
+                    toastr.error(response.message); // , toastr.success("message") ... .warning(), .error()
                 }
                 hideMask();
             }
@@ -355,6 +356,7 @@ jQuery(document).ready(function () {
                 }
             });
             console.log(data);
+            //var doAjax = function (url, data, pre, post, onSuccess, onFailure, suppressErrorMessage, onHttpFailure, shouldHideMask, immediatelyHideMaskOnReply)
             doAjax(url, data, null, function () {
                 moe.isProcessing = false;
             }, function (data) {
@@ -375,7 +377,9 @@ jQuery(document).ready(function () {
                 } else {
                     pageReload();
                 }
-            });
+            }, function (errorMessage) {
+
+            }, true);
         });
     });
 

+ 1 - 1
resources/views/layouts/patient.blade.php

@@ -135,7 +135,7 @@
                                             @else
                                                 none!
                                                 <div moe>
-                                                    <a href="" start show>[assign someone]</a>
+                                                    <a href="" start>[assign someone]</a>
                                                     <form url="/api/client/putCmPro">
                                                         <input type="hidden" name="uid" value="{{$patient->uid}}">
                                                         <div class="form-group">