Skip to content

Commit

Permalink
chore: rename severity level to alert class AB#25984
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisvisser committed Jan 19, 2024
1 parent 343efd6 commit a86fb12
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@
><span *ngIf="actionIndicatorNumberFormat === 'perc'">{{
area.actionsValue | percent: '.0-0'
}}</span>
<span *ngIf="area.severityLevel"> - {{
area.severityLevel
<span *ngIf="area.alertClass"> - {{
area.alertClass
}}</span>
</p>
</li>
Expand Down Expand Up @@ -226,8 +226,8 @@
><span *ngIf="actionIndicatorNumberFormat === 'perc'">{{
area.actionsValue | percent: '.0-0'
}}</span>
<span *ngIf="area.severityLevel"> - {{
area.severityLevel
<span *ngIf="area.alertClass"> - {{
area.alertClass
}}</span>
</p>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class EapActionsService {
if (this.getActiveLeadtime()) {
this.triggeredAreas.forEach((area) => {
this.formatDates(area);
this.mapSeverityLevel(area);
this.mapTriggerValueToAlertClass(area);
this.filterEapActionsByMonth(area);
area.eapActions.forEach((action) => {
if (Object.keys(action.month).length) {
Expand Down Expand Up @@ -183,8 +183,8 @@ export class EapActionsService {
).toFormat('cccc, dd LLLL');
};

private mapSeverityLevel = (triggeredArea: TriggeredArea) => {
// If no match is found, then no severity level will be shown
private mapTriggerValueToAlertClass = (triggeredArea: TriggeredArea) => {
// If no match is found, then no alert class will be shown
if (this.countryDisasterSettings.eapAlertClasses) {
for (const alertClass of Object.keys(
this.countryDisasterSettings.eapAlertClasses,
Expand All @@ -193,7 +193,7 @@ export class EapActionsService {
triggeredArea.triggerValue ===
this.countryDisasterSettings.eapAlertClasses[alertClass].value
) {
triggeredArea.severityLevel = this.countryDisasterSettings.eapAlertClasses[
triggeredArea.alertClass = this.countryDisasterSettings.eapAlertClasses[
alertClass
].label;
}
Expand Down
2 changes: 1 addition & 1 deletion interfaces/IBF-dashboard/src/app/types/triggered-area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export class TriggeredArea {
stopped: boolean;
stoppedDate: string;
submitDisabled: boolean;
severityLevel?: string;
alertClass?: string;
}

0 comments on commit a86fb12

Please sign in to comment.