Skip to content

Commit

Permalink
Merge pull request #211 from severinbeauvais/master
Browse files Browse the repository at this point in the history
NOBUG: cleaned up region helper
  • Loading branch information
severinbeauvais authored Aug 30, 2018
2 parents 745edc5 + f10af6b commit 46f9e4a
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/app/services/application.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ApplicationService {
readonly VANCOUVER_ISLAND = 'VI';

public applicationStatuses: Array<string> = [];
public regions: Array<string> = [];
private regions: Array<string> = [];
private application: Application = null;

constructor(
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 46f9e4a

Please sign in to comment.