LP1734775: Show multiple items in Item Status
authorJason Boyer <jboyer@library.in.gov>
Thu, 17 Jan 2019 14:58:08 +0000 (09:58 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 8 Mar 2019 14:50:10 +0000 (09:50 -0500)
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 <jboyer@library.in.gov>
Signed-off-by: Josh Stompro <stompro@stompro.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/cat/item/app.js

index 2e98c38..1ff71f3 100644 (file)
@@ -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 = {