Skip to content

Commit

Permalink
Merge branch 'feat.floods-leadtime-event' of https://github.com/rodek…
Browse files Browse the repository at this point in the history
…ruis/IBF-system into feat.floods-leadtime-event
  • Loading branch information
jannisvisser committed Mar 22, 2024
2 parents ccb971a + 0354295 commit 2f024af
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</span>
<p>
<span
*ngIf="!event.duration"
*ngIf="!event.duration && showFirstWarningDate()"
[innerHTML]="
'chat-component.' +
disasterTypeName +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,20 @@ export class EventSpeechBubbleComponent implements AfterViewChecked, OnDestroy {
},
);
}

public showFirstWarningDate(): boolean {
if (!this.event) {
return true;
}

if (this.disasterTypeName !== DisasterTypeKey.floods) {
return true;
}

if (this.event.firstLeadTime !== this.event.firstTriggerLeadTime) {
return true;
}

return false;
}
}
2 changes: 1 addition & 1 deletion interfaces/IBF-dashboard/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"header-below-trigger": "Warning: {{ disasterTypeLabel }} on {{firstLeadTimeDate}}",
"header-ongoing-below-trigger": "Ongoing warning: {{ disasterTypeLabel }} on {{firstLeadTimeDate}}",
"welcome": "First warning on {{firstLeadTimeDate}}",
"welcome-below-trigger": "First trigger on {{firstTriggerLeadTimeDate}}."
"welcome-below-trigger": ""
},
"active-event": {
"overview": "There are <strong>{{ nrTriggeredAreas }}</strong> {{ adminAreaLabelPlural }} exposed. They are listed below by alert level and by {{ actionIndicator}}. Only triggered {{adminAreaLabelPlural}} are highlighted in the map with a red outline.",
Expand Down

0 comments on commit 2f024af

Please sign in to comment.