From 5ec2a27f0aa2645f3e63ac11c5f9a8ea08154fca Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 25 Aug 2017 15:17:25 -0400 Subject: [PATCH] LP#1685929: adjust egItem.print_spine_labels() Make egItem.print_spine_labels() accept a list of copy IDs and make the caller responsible for putting that list together. Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/circ/checkin/app.js | 6 +++++- Open-ILS/web/js/ui/default/staff/circ/services/item.js | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js index 7f86eb3ebb..bbc8bbe99b 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js @@ -376,7 +376,11 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg } $scope.printSpineLabels = function(items){ - itemSvc.print_spine_labels(items); + var copy_ids = []; + angular.forEach(items, function(item) { + if (item.acp) copy_ids.push(item.acp.id()); + }); + itemSvc.print_spine_labels(copy_ids); } }]) diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/item.js b/Open-ILS/web/js/ui/default/staff/circ/services/item.js index 278e43327f..28eae2a191 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/item.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/item.js @@ -887,12 +887,12 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog }); } - service.print_spine_labels = function(copies){ + service.print_spine_labels = function(copy_ids){ egCore.net.request( 'open-ils.actor', 'open-ils.actor.anon_cache.set_value', null, 'print-labels-these-copies', { - copies : service.gatherSelectedHoldingsIds(copies) + copies : copy_ids } ).then(function(key) { if (key) { -- 2.43.2