From 5f66a6106c005548e46dc23df70a6d84c4711ae9 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 5 Jul 2019 14:21:49 -0400 Subject: [PATCH] LP1834662 Allow date format defaults to persist. Avoid clobbering the default date / time format strings set by the FormatService. Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg --- Open-ILS/src/eg2/src/app/staff/resolver.service.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/resolver.service.ts b/Open-ILS/src/eg2/src/app/staff/resolver.service.ts index 2c94ec76d3..94b469ee67 100644 --- a/Open-ILS/src/eg2/src/app/staff/resolver.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/resolver.service.ts @@ -133,9 +133,17 @@ export class StaffResolver implements Resolve> { 'ui.staff.max_recent_patrons', 'ui.staff.angular_catalog.enabled' // navbar ]).then(settings => { - this.format.wsOrgTimezone = settings['lib.timezone']; - this.format.dateFormat = settings['webstaff.format.dates']; - this.format.dateTimeFormat = settings['webstaff.format.date_and_time']; + // Avoid clobbering defaults + if (settings['lib.timezone']) { + this.format.wsOrgTimezone = settings['lib.timezone']; + } + if (settings['webstaff.format.dates']) { + this.format.dateFormat = settings['webstaff.format.dates']; + } + if (settings['webstaff.format.date_and_time']) { + this.format.dateTimeFormat = + settings['webstaff.format.date_and_time']; + } }); } } -- 2.11.0