@@ -14,6 +14,7 @@ import Image from '#components/printable/Image';
1414import Heading from '#components/printable/Heading' ;
1515import Link from '#components/printable/Link' ;
1616
17+ import DateOutput from '#components/DateOutput' ;
1718import DescriptionText from '#components/printable/DescriptionText' ;
1819import NumberOutput from '#components/NumberOutput' ;
1920import useTranslation from '#hooks/useTranslation' ;
@@ -25,6 +26,7 @@ import {
2526 DREF_TYPE_ASSESSMENT ,
2627 DREF_TYPE_IMMINENT ,
2728 DisasterCategory ,
29+ ONSET_SLOW ,
2830} from '#utils/constants' ;
2931import {
3032 identifiedNeedsAndGapsOrder ,
@@ -144,9 +146,15 @@ export function Component() {
144146 const imagesFileDefined = isDefined ( drefResponse )
145147 && isDefined ( drefResponse . images_file )
146148 && drefResponse . images_file . length > 0 ;
149+ const eventDateDefined = drefResponse ?. type_of_dref !== DREF_TYPE_IMMINENT
150+ && isDefined ( drefResponse ?. event_date ) ;
151+ const eventTextDefined = drefResponse ?. type_of_dref === DREF_TYPE_IMMINENT
152+ && isDefined ( drefResponse ?. event_text ) ;
147153 const showEventDescriptionSection = eventDescriptionDefined
148154 || eventScopeDefined
149155 || imagesFileDefined
156+ || eventDateDefined
157+ || eventTextDefined
150158 || isDefined ( drefResponse ?. event_map_file ?. file ) ;
151159
152160 const ifrcActionsDefined = isTruthyString ( drefResponse ?. ifrc ?. trim ( ) ) ;
@@ -394,6 +402,24 @@ export function Component() {
394402 />
395403 </ Container >
396404 ) }
405+ { eventTextDefined && (
406+ < Container heading = { strings . approximateDateOfImpactHeading } >
407+ < DescriptionText >
408+ { drefResponse . event_text }
409+ </ DescriptionText >
410+ </ Container >
411+ ) }
412+ { eventDateDefined && (
413+ < Container
414+ heading = { drefResponse ?. type_of_onset === ONSET_SLOW
415+ ? strings . dateWhenTriggerWasMetHeading
416+ : strings . dateOfEventSlowHeading }
417+ >
418+ < DateOutput
419+ value = { drefResponse ?. event_date }
420+ />
421+ </ Container >
422+ ) }
397423 { eventDescriptionDefined && (
398424 < Container
399425 heading = { drefResponse ?. type_of_dref === DREF_TYPE_IMMINENT
0 commit comments