From 6a2d27a7a1ad5bd25d6660e8cfb2e288d108fc2f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 25 May 2017 13:54:09 -0400 Subject: [PATCH] webstaff: add Predict New Issues button to predictions tab Signed-off-by: Galen Charlton --- .../src/templates/staff/serials/t_prediction_manager.tt2 | 1 + .../default/staff/serials/directives/prediction_manager.js | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 b/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 index e2e403a784..343f6368bf 100644 --- a/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 +++ b/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 @@ -63,6 +63,7 @@
+
diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_manager.js b/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_manager.js index 1a0b4611d4..7cace142c7 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_manager.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_manager.js @@ -11,9 +11,9 @@ angular.module('egSerialsAppDep') templateUrl: './serials/t_prediction_manager', controller: ['$scope','$q','egSerialsCoreSvc','egCore','egGridDataProvider', - '$uibModal','$timeout', + '$uibModal','$timeout','$location', function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , - $uibModal , $timeout) { + $uibModal , $timeout , $location) { egSerialsCoreSvc.fetch($scope.bibId).then(function() { reload($scope.ssubId); @@ -127,6 +127,15 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , }); } + $scope.add_issuances = function() { + return egSerialsCoreSvc.fetchItemsForSub($scope.ssubId).then(function() { + egSerialsCoreSvc.add_issuances($scope.ssubId).then(function() { + $location.path('/serials/' + $scope.bibId + '/issues/' + + $scope.ssubId); + }); + }); + } + }] } }) -- 2.11.0