LP#1402797 Supply top-level method for uncanceling holds
authorMike Rylander <mrylander@gmail.com>
Tue, 11 Nov 2014 18:26:21 +0000 (13:26 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 12 Feb 2015 16:58:27 +0000 (11:58 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/circ/services/holds.js

index 77e4fb9..ee2fa79 100644 (file)
@@ -449,6 +449,14 @@ function($window , $location , egCore , egHolds , egCirc) {
         return egHolds.cancel_holds(hold_ids).then(service.refresh);
     }
 
+    service.uncancel_hold = function(items) {
+        var hold_ids = items.filter(function(item) {
+            return item.hold.cancel_time();
+        }).map(function(item) {return item.hold.id()});
+
+        return egHolds.uncancel_holds(hold_ids).then(service.refresh);
+    }
+
     // jump to circ list for either 1) the targeted copy or
     // 2) the hold target copy for copy-level holds
     service.show_recent_circs = function(items) {