From 4ab4869d498c48b4808c7ec15ae053b874259151 Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Thu, 17 Jan 2019 09:58:08 -0500 Subject: [PATCH] LP1734775: Show multiple items in Item Status The ListCtrl controller was only displaying a single copy when an id list was passed to Item Status in the URL. This branch separates each id into a separate fetch call and when all have been resolved it refreshes the grid, which now has all of the items. Signed-off-by: Jason Boyer Signed-off-by: Josh Stompro Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/staff/cat/item/app.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 2e98c386f3..1ff71f3bc4 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 @@ -623,11 +623,12 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD } if (copyId.length > 0) { - itemSvc.fetch(null,copyId).then( - function() { - copyGrid.refresh(); - } - ); + var fetch_list = []; + angular.forEach(copyId, function (c) { + fetch_list.push(itemSvc.fetch(null,c)); + }); + + return $q.all(fetch_list).then(function (res) { copyGrid.refresh(); }); } $scope.statusIconColumn = { -- 2.43.2