From fc007e72a960d93bac7ed514a9bc4f1b8d525240 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 4 Mar 2016 12:14:07 -0500 Subject: [PATCH] LP#1570091: webstaff: Add Cancel Transit action to item status Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Bill Erickson --- Open-ILS/src/templates/staff/cat/item/t_list.tt2 | 16 +++++++++------- Open-ILS/web/js/ui/default/staff/cat/item/app.js | 9 +++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 b/Open-ILS/src/templates/staff/cat/item/t_list.tt2 index 6dddad3a26..596a24b4d1 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_list.tt2 @@ -14,11 +14,13 @@ + label="[% l('Delete Items') %]"> + label="[% l('Check In Items') %]"> + label="[% l('Renew Items') %]"> + @@ -33,16 +35,16 @@ label="[% l('Item as Missing') %]"> + label="[% l('Items') %]"> + label="[% l('Volumes and Items') %]"> + label="[% l('Items') %]"> + label="[% l('Volumes and Items') %]"> diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index a2750ceb2e..e42064be71 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -581,6 +581,15 @@ function($scope , $q , $routeParams , $location , $timeout , $window , egCore , $location.path('/cat/item/' + item.id + '/holds'); } + $scope.cancel_transit = function () { + var initial_list = copyGrid.selectedItems(); + angular.forEach(copyGrid.selectedItems(), function(cp) { + egCirc.find_copy_transit(null, {copy_barcode:cp.barcode}) + .then(function(t) { return egCirc.abort_transit(t.id()) }) + .then(function() { return add_barcode_to_list(cp.barcode) }); + }); + } + $scope.selectedHoldingsDamaged = function () { var initial_list = copyGrid.selectedItems(); egCirc.mark_damaged(gatherSelectedHoldingsIds()).then(function(){ -- 2.43.2