From f10af6bc98c0d9e575acba3b03d3b0f1acbdb1a2 Mon Sep 17 00:00:00 2001 From: Severin Beauvais Date: Thu, 30 Aug 2018 15:50:50 -0700 Subject: [PATCH] NOBUG: cleaned up region helper --- src/app/services/application.service.ts | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/app/services/application.service.ts b/src/app/services/application.service.ts index 981b7a14..b7a1220a 100644 --- a/src/app/services/application.service.ts +++ b/src/app/services/application.service.ts @@ -43,7 +43,7 @@ export class ApplicationService { readonly VANCOUVER_ISLAND = 'VI'; public applicationStatuses: Array = []; - public regions: Array = []; + private regions: Array = []; private application: Application = null; constructor( @@ -422,17 +422,15 @@ export class ApplicationService { } getRegion(regionCode: string): string { - if (regionCode) { - switch (regionCode) { - case this.CARIBOO: return this.regions[this.CARIBOO]; - case this.KOOTENAY: return this.regions[this.KOOTENAY]; - case this.LOWER_MAINLAND: return this.regions[this.LOWER_MAINLAND]; - case this.OMENICA: return this.regions[this.OMENICA]; - case this.PEACE: return this.regions[this.PEACE]; - case this.SKEENA: return this.regions[this.SKEENA]; - case this.SOUTHERN_INTERIOR: return this.regions[this.SOUTHERN_INTERIOR]; - case this.VANCOUVER_ISLAND: return this.regions[this.VANCOUVER_ISLAND]; - } + switch (regionCode) { + case this.CARIBOO: return this.regions[this.CARIBOO]; + case this.KOOTENAY: return this.regions[this.KOOTENAY]; + case this.LOWER_MAINLAND: return this.regions[this.LOWER_MAINLAND]; + case this.OMENICA: return this.regions[this.OMENICA]; + case this.PEACE: return this.regions[this.PEACE]; + case this.SKEENA: return this.regions[this.SKEENA]; + case this.SOUTHERN_INTERIOR: return this.regions[this.SOUTHERN_INTERIOR]; + case this.VANCOUVER_ISLAND: return this.regions[this.VANCOUVER_ISLAND]; } return null;