lp1747664 edit call numbers in copy bucket user/mrisher/lp1747664-copy-bucket-call-numbers
authorMike Risher <mrisher@catalyte.io>
Fri, 5 Jun 2020 18:31:22 +0000 (18:31 +0000)
committerMike Risher <mrisher@catalyte.io>
Fri, 5 Jun 2020 18:31:22 +0000 (18:31 +0000)
Modify the copy 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>
 Changes to be committed:
modified:   Open-ILS/src/templates/staff/cat/bucket/copy/t_view.tt2
modified:   Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js

Open-ILS/src/templates/staff/cat/bucket/copy/t_view.tt2
Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js

index adc1f50..322cc0d 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="print_labels" group="[% l('Show') %]"
     label="[% l('Print Labels') %]"></eg-grid-action>
   <eg-grid-action label="[% l('Transfer Selected Items to Marked Call Number') %]" group="[% l('Items') %]"
index bebb642..aeefc9a 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) {