From a86fb12550ff3eb12c4b450f62589893ce65ab38 Mon Sep 17 00:00:00 2001
From: jannisvisser
Date: Fri, 19 Jan 2024 14:15:23 +0100
Subject: [PATCH] chore: rename severity level to alert class AB#25984
---
.../event-speech-bubble.component.html | 8 ++++----
.../IBF-dashboard/src/app/services/eap-actions.service.ts | 8 ++++----
interfaces/IBF-dashboard/src/app/types/triggered-area.ts | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/interfaces/IBF-dashboard/src/app/components/event-speech-bubble/event-speech-bubble.component.html b/interfaces/IBF-dashboard/src/app/components/event-speech-bubble/event-speech-bubble.component.html
index e839f9f4d..c0f02e568 100644
--- a/interfaces/IBF-dashboard/src/app/components/event-speech-bubble/event-speech-bubble.component.html
+++ b/interfaces/IBF-dashboard/src/app/components/event-speech-bubble/event-speech-bubble.component.html
@@ -172,8 +172,8 @@
>{{
area.actionsValue | percent: '.0-0'
}}
- - {{
- area.severityLevel
+ - {{
+ area.alertClass
}}
@@ -226,8 +226,8 @@
>{{
area.actionsValue | percent: '.0-0'
}}
- - {{
- area.severityLevel
+ - {{
+ area.alertClass
}}
diff --git a/interfaces/IBF-dashboard/src/app/services/eap-actions.service.ts b/interfaces/IBF-dashboard/src/app/services/eap-actions.service.ts
index 004a855b4..cb7228dd6 100644
--- a/interfaces/IBF-dashboard/src/app/services/eap-actions.service.ts
+++ b/interfaces/IBF-dashboard/src/app/services/eap-actions.service.ts
@@ -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) {
@@ -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,
@@ -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;
}
diff --git a/interfaces/IBF-dashboard/src/app/types/triggered-area.ts b/interfaces/IBF-dashboard/src/app/types/triggered-area.ts
index cd98743dd..978954d36 100644
--- a/interfaces/IBF-dashboard/src/app/types/triggered-area.ts
+++ b/interfaces/IBF-dashboard/src/app/types/triggered-area.ts
@@ -16,5 +16,5 @@ export class TriggeredArea {
stopped: boolean;
stoppedDate: string;
submitDisabled: boolean;
- severityLevel?: string;
+ alertClass?: string;
}