webstaff: sound for batch hold edit
authorJason Etheridge <jason@esilibrary.com>
Mon, 12 Dec 2016 20:20:36 +0000 (15:20 -0500)
committerKathy Lussier <klussier@masslnc.org>
Mon, 9 Jan 2017 15:59:00 +0000 (10:59 -0500)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/circ/services/holds.js

index 2b2ed77..27aae5e 100644 (file)
@@ -169,7 +169,19 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
         return egCore.net.request(
             'open-ils.circ',
             'open-ils.circ.hold.update.batch',
         return egCore.net.request(
             'open-ils.circ',
             'open-ils.circ.hold.update.batch',
-            egCore.auth.token(), null, new_values);
+            egCore.auth.token(), null, new_values).then(
+            function(resp) {
+                if (evt = egCore.evt.parse(resp)) {
+                    egCore.audio.play(
+                        'warning.hold.batch_update');
+                    console.error('unable to batch update holds: '
+                        + evt.toString());
+                } else {
+                    egCore.audio.play(
+                        'success.hold.batch_update');
+                }
+            }
+        );
     }
 
     service.set_copy_quality = function(hold_ids) {
     }
 
     service.set_copy_quality = function(hold_ids) {