From: Galen Charlton Date: Thu, 25 May 2017 17:54:09 +0000 (-0400) Subject: webstaff: add Predict New Issues button to predictions tab X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6a2d27a7a1ad5bd25d6660e8cfb2e288d108fc2f;p=working%2FEvergreen.git webstaff: add Predict New Issues button to predictions tab Signed-off-by: Galen Charlton --- 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); + }); + }); + } + }] } })