From: Galen Charlton Date: Thu, 27 Apr 2017 16:58:57 +0000 (-0400) Subject: webstaff: start list of patterns X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b44184b74702dc60bab3baf685ce3eb36ff7907e;p=working%2FEvergreen.git webstaff: start list of patterns 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 49b863f502..ea0c9af2db 100644 --- a/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 +++ b/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 @@ -1,3 +1,32 @@
+ +
+
+ +
+
+ +
+
+ + {{pred.create_date | date:"shortDate"}} +
+
+ + + +
+
+ +
+ +
+
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 8927c9a199..fe5d5ba616 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 @@ -14,6 +14,20 @@ angular.module('egSerialsAppDep') '$uibModal', function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , $uibModal) { + + egSerialsCoreSvc.fetch($scope.bibId).then(function() { + reload($scope.ssubId); + }); + + function reload(ssubId) { + var ssub = egSerialsCoreSvc.get_ssub(ssubId); + $scope.predictions = egCore.idl.toTypedHash(ssub.scaps()); + } + + $scope.$watch('ssubId', function(newVal, oldVal) { + if (newVal && newVal != oldVal) reload(newVal); + }); + }] } }) diff --git a/Open-ILS/web/js/ui/default/staff/serials/services/core.js b/Open-ILS/web/js/ui/default/staff/serials/services/core.js index d138df4fe0..2f69e04a8a 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/services/core.js +++ b/Open-ILS/web/js/ui/default/staff/serials/services/core.js @@ -152,5 +152,13 @@ function(egCore , orderByFilter , $q) { return deferred.promise; } + service.get_ssub = function(ssubId) { + for (var i = 0; i <= service.subTree.length; i++) { + if (service.subTree[i].id() == ssubId) { + return service.subTree[i]; + } + } + } + return service; }]);