lp1747664 add batch edit of call numbers to item bucket
authorMike Risher <mrisher@catalyte.io>
Fri, 5 Jun 2020 18:31:22 +0000 (18:31 +0000)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 18 Aug 2020 21:32:11 +0000 (17:32 -0400)
Modify the item bucket so that one can batch edit call numbers, like
one can from the item status page.

Signed-off-by: Mike Risher <mrisher@catalyte.io>
Signed-off-by: Elaine Hardy <ehardy@georgialibraries.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/cat/bucket/copy/t_view.tt2
Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js

index 29dc8a3..b38e132 100644 (file)
@@ -18,6 +18,8 @@
     handler="requestItems"></eg-grid-action>
   <eg-grid-action label="[% l('Edit Selected Items') %]" group="[% l('Items') %]"
     handler="spawnHoldingsEdit"></eg-grid-action>
+  <eg-grid-action label="[% l('Edit Call Numbers') %]" group="[% l('Items') %]"
+    handler="spawnCallNumberEdit"></eg-grid-action>
   <eg-grid-action handler="showItems" group="[% l('Show') %]"
     label="[% l('Open in Item Status') %]"></eg-grid-action>  
   <eg-grid-action handler="print_labels" group="[% l('Show') %]"
index e7aeccd..4216128 100644 (file)
@@ -568,20 +568,27 @@ function($scope,  $q , $routeParams , $timeout , $window , $uibModal , bucketSvc
         $scope.detachCopies(copies);
     }
 
-    $scope.spawnHoldingsEdit = function (copies) {
+    $scope.spawnHoldingsEdit = function() {
+        $scope.spawnEdit(true, false);
+    }
+
+    $scope.spawnCallNumberEdit = function() {
+        $scope.spawnEdit(false, true);
+    }
+
+    $scope.spawnEdit = function(hide_vols,hide_copies) {
         var cp_list = []
         angular.forEach($scope.gridControls.selectedItems(), function (i) {
             cp_list.push(i.id);
-        })
-
+        });
         egCore.net.request(
             'open-ils.actor',
             'open-ils.actor.anon_cache.set_value',
             null, 'edit-these-copies', {
                 record_id: 0, // false-y value for record_id disables record summary
                 copies: cp_list,
-                hide_vols : true,
-                hide_copies : false
+                hide_vols : hide_vols,
+                hide_copies : hide_copies
             }
         ).then(function(key) {
             if (key) {