From: Galen Charlton Date: Mon, 24 Jul 2017 21:40:20 +0000 (-0400) Subject: webstaff serials: support combined pattern regularity X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=43f76035aae67e021a8e5a382202a0a0ad67409b;p=working%2FEvergreen.git webstaff serials: support combined pattern regularity Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/templates/staff/serials/t_prediction_wizard.tt2 b/Open-ILS/src/templates/staff/serials/t_prediction_wizard.tt2 index 2596a46362..cd97232e39 100644 --- a/Open-ILS/src/templates/staff/serials/t_prediction_wizard.tt2 +++ b/Open-ILS/src/templates/staff/serials/t_prediction_wizard.tt2 @@ -345,7 +345,10 @@
-
+
+ +
+
diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_wizard.js b/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_wizard.js index b575d48145..d9beaff737 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_wizard.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_wizard.js @@ -204,7 +204,9 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider) { var chron_type = value.substring(1, 2); value.substring(2).split(/,/).forEach(function(value) { var piece = {}; - if (chron_type == 'd') { + if (regularity_type == 'c') { + piece.combined_code = value; + } else if (chron_type == 'd') { if (value.match(/^\d\d$/)) { piece.sub_type = 'day_of_month'; piece.day_of_month = value; @@ -347,7 +349,9 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider) { patternCode.push('y'); var val = reg.regularity_type + reg.chron_type; val += reg.parts.map(function(part) { - if (reg.chron_type == 'd') { + if (reg.regularity_type == 'c') { + return part.combined_code; + } else if (reg.chron_type == 'd') { return part[part.sub_type]; } else if (reg.chron_type == 'm') { return part.month;