LP#1685929-Adds more XUL parity to Webstaff checkIn
authorCesar Velez <Cesar.Velez@equinoxinitiative.org>
Thu, 20 Jul 2017 20:08:13 +0000 (21:08 +0100)
committerCesar Velez <cesar.velez@equinoxinitiative.org>
Tue, 1 Aug 2017 18:49:56 +0000 (14:49 -0400)
Grid context actiions like Add Items to Bucket, Show Holds on Bib, Show Last Few Circulations, Edit
Item Attributes, Mark Item Missing Pieces, Print Spine Label, are
missing from CheckIn in webstaff.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Open-ILS/src/templates/staff/circ/checkin/t_checkin_table.tt2
Open-ILS/web/js/ui/default/staff/circ/checkin/app.js

index 0ccf9e4..c4a9788 100644 (file)
@@ -8,7 +8,10 @@
   grid-controls="gridControls"
   persist-key="{{grid_persist_key}}"
   dateformat="{{$root.egDateAndTimeFormat}}">
-
+  
+  <eg-grid-action handler="add_copies_to_bucket"
+    label="[% l('Add Items to Bucket') %]">
+  </eg-grid-action>
   <eg-grid-action 
     handler="fetchLastCircPatron"
     label="[% l('Retrieve Last Patron Who Circulated Item') %]">
index 099b1be..8009938 100644 (file)
@@ -34,8 +34,8 @@ angular.module('egCheckinApp', ['ngRoute', 'ui.bootstrap',
  * Manages checkin
  */
 .controller('CheckinCtrl',
-       ['$scope','$q','$window','$location','egCore','checkinSvc','egGridDataProvider','egCirc',
-function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataProvider , egCirc)  {
+       ['$scope','$q','$window','$location','egCore','checkinSvc','egGridDataProvider','egCirc', 'itemSvc',
+function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataProvider , egCirc, itemSvc)  {
 
     $scope.focusMe = true;
     $scope.checkins = checkinSvc.checkins;
@@ -326,5 +326,14 @@ function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataPro
         });
     }
 
+    $scope.add_copies_to_bucket = function(items){
+        var itemsIds = [];
+        angular.forEach(items, function(cp){
+            itemsIds.push(cp.acp.id());
+        });
+
+        itemSvc.add_copies_to_bucket(itemsIds);
+    }
+
 }])