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') %]">
* 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;
});
}
+ $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);
+ }
+
}])