From 4498c5e9e4dc2c48eea0ee856658c189e6befab0 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 2 Jun 2017 16:26:42 -0400 Subject: [PATCH] webstaff: go ahead and start new sub with one distribution Similarly, ensure that each new distribution has a stream Signed-off-by: Galen Charlton --- .../web/js/ui/default/staff/serials/directives/subscription_manager.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/subscription_manager.js b/Open-ILS/web/js/ui/default/staff/serials/directives/subscription_manager.js index 22fc1bae5f..c1a677267d 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/subscription_manager.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/subscription_manager.js @@ -58,6 +58,7 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , new_ssub._isnew = true; new_ssub.record_entry = $scope.bibId; $scope.subscriptions.push(new_ssub); + $scope.add_distribution(new_ssub); // since we know we want at least one distribution } $scope.add_distribution = function(ssub) { var new_sdist = egCore.idl.toTypedHash(new egCore.idl.sdist()); @@ -67,6 +68,7 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , ssub.distributions = []; } ssub.distributions.push(new_sdist); + $scope.add_stream(new_sdist); // since we know we want at least one stream } $scope.add_stream = function(sdist) { var new_sstr = egCore.idl.toTypedHash(new egCore.idl.sstr()); -- 2.11.0