From: Jason Boyer Date: Thu, 17 Jan 2019 14:58:08 +0000 (-0500) Subject: LP1734775: Show multiple items in Item Status X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8046744dd9a347f0d5e285dd966ec0e3d0f302a7;p=working%2FEvergreen.git 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 --- 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 92901973f9..06d9a19595 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 @@ -540,11 +540,12 @@ function($scope , $q , $routeParams , $location , $timeout , $window , egCore , } 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(); }); } }])