Skip to content

Commit e32f5d2

Browse files
barshathakurifrozenhelium
authored andcommitted
Update final report form for dref imminent type
1 parent 3feed63 commit e32f5d2

File tree

10 files changed

+680
-583
lines changed

10 files changed

+680
-583
lines changed

app/src/views/DrefFinalReportExport/i18n.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"drefApplicationFormImageAlt": "Image",
55
"imageLogoIFRCAlt": "IFRC",
66
"exportTitle": "DREF Final Report",
7+
"imminentExportTitle": "Imminent DREF Final Report",
78
"drefExportReference": "Click here for reference",
89
"downloadFinancialReport": "Click here for the complete financial report",
910
"appealLabel": "Appeal",
@@ -23,7 +24,7 @@
2324
"hasWhistleblowerProtectionPolicy": "Does your National Society have whistleblower protection policy?",
2425
"hasAntiSexualHarassmentPolicy": "Does your National Society have anti-sexual harassment policy?",
2526
"peopleAssistedLabel": "People Assisted",
26-
"totalAssistedPopulationLabel": "Total Assisted Population",
27+
"totalAssistedPopulationLabel": "Total Population Assisted",
2728
"peopleSuffix": " people",
2829
"operationStartDateLabel": "Operation Start Date",
2930
"operationTimeframeLabel": "Total Operating Timeframe",
@@ -32,14 +33,17 @@
3233
"additionalAllocationRequestedLabel": "Additional Allocation Requested",
3334
"targetedAreasLabel": "Targeted Regions",
3435
"eventDescriptionSectionHeading": "Description of the Event",
36+
"eventDevelopmentHeading": "Event development",
3537
"approximateDateOfImpactHeading": "Approximate date of impact",
3638
"whatWhereWhenSectionHeading": "What happened, where and when?",
3739
"dateOfEventSlowHeading": "Date of event",
3840
"dateWhenTriggerWasMetHeading": "Date when the trigger was met",
3941

40-
"situationUpdateSectionHeading": "Provide any updates in the situation since the field report and explain what is expected to happen.",
42+
"eventDevelopmentSectionHeading": "Update regarding the event’s development",
43+
"eventDevelopmentSectionDescription": "In case of the event not materialising please explain why not.",
4144
"anticipatoryActionsHeading": "Why your National Society is acting now and what criteria is used to launch this operation.",
4245
"scopeAndScaleSectionHeading": "Scope and Scale",
46+
"eventsImpactHeading": "Events impact",
4347
"nationalSocietyActionsHeading": "National Society Actions",
4448
"nsConductedInterventionLabel": "Have the National Society conducted any intervention additionally to those part of this DREF Operation?",
4549
"nsInterventionDescriptionLabel": "Please provide a brief description of those additional activities",

app/src/views/DrefFinalReportExport/index.tsx

Lines changed: 91 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,15 @@ export function Component() {
310310
alt={strings.imageLogoIFRCAlt}
311311
/>
312312
<div>
313-
<Heading level={1}>
314-
{strings.exportTitle}
315-
</Heading>
313+
{drefResponse?.type_of_dref === DREF_TYPE_IMMINENT ? (
314+
<Heading level={1}>
315+
{strings.imminentExportTitle}
316+
</Heading>
317+
) : (
318+
<Heading level={1}>
319+
{strings.exportTitle}
320+
</Heading>
321+
)}
316322
<div className={styles.drefContentTitle}>
317323
{drefResponse?.title}
318324
</div>
@@ -440,17 +446,20 @@ export function Component() {
440446
<>
441447
<div className={styles.pageBreak} />
442448
<Heading level={2}>
443-
{strings.eventDescriptionSectionHeading}
449+
{drefResponse?.type_of_dref === DREF_TYPE_IMMINENT
450+
? strings.eventDevelopmentHeading
451+
: strings.eventDescriptionSectionHeading}
444452
</Heading>
445-
{isTruthyString(drefResponse?.event_map_file?.file) && (
453+
{isTruthyString(drefResponse?.event_map_file?.file)
454+
&& drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
446455
<Container>
447456
<Image
448457
src={drefResponse?.event_map_file?.file}
449458
caption={drefResponse?.event_map_file?.caption}
450459
/>
451460
</Container>
452461
)}
453-
{eventTextDefined && (
462+
{eventTextDefined && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
454463
<Container heading={strings.approximateDateOfImpactHeading}>
455464
<DescriptionText>
456465
{drefResponse.event_text}
@@ -472,7 +481,7 @@ export function Component() {
472481
{eventDescriptionDefined && (
473482
<Container
474483
heading={drefResponse?.type_of_dref === DREF_TYPE_IMMINENT
475-
? strings.situationUpdateSectionHeading
484+
? strings.eventDevelopmentSectionHeading
476485
: strings.whatWhereWhenSectionHeading}
477486
>
478487
<DescriptionText>
@@ -495,7 +504,9 @@ export function Component() {
495504
)}
496505
{eventScopeDefined && (
497506
<Container
498-
heading={strings.scopeAndScaleSectionHeading}
507+
heading={drefResponse?.type_of_dref === DREF_TYPE_IMMINENT
508+
? strings.eventsImpactHeading
509+
: strings.scopeAndScaleSectionHeading}
499510
>
500511
<DescriptionText>
501512
{drefResponse?.event_scope}
@@ -537,7 +548,7 @@ export function Component() {
537548
)}
538549
</>
539550
)}
540-
{showNsActionsSection && (
551+
{showNsActionsSection && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
541552
<Container
542553
heading={strings.nationalSocietyActionsHeading}
543554
childrenContainerClassName={styles.nsActionsContent}
@@ -559,7 +570,8 @@ export function Component() {
559570
)}
560571
</Container>
561572
)}
562-
{showMovementPartnersActionsSection && (
573+
{showMovementPartnersActionsSection
574+
&& drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
563575
<Container
564576
heading={strings.movementPartnersActionsHeading}
565577
childrenContainerClassName={styles.movementPartnersActionsContent}
@@ -583,7 +595,7 @@ export function Component() {
583595
)}
584596
</Container>
585597
)}
586-
{icrcActionsDefined && (
598+
{icrcActionsDefined && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
587599
<Container
588600
heading={strings.icrcActionsHeading}
589601
childrenContainerClassName={styles.icrcActionsContent}
@@ -594,7 +606,7 @@ export function Component() {
594606
</DescriptionText>
595607
</Container>
596608
)}
597-
{showOtherActorsActionsSection && (
609+
{showOtherActorsActionsSection && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
598610
<Container
599611
heading={strings.otherActionsHeading}
600612
childrenContainerClassName={styles.otherActionsContent}
@@ -636,7 +648,7 @@ export function Component() {
636648
)}
637649
</Container>
638650
)}
639-
{showNeedsIdentifiedSection && (
651+
{showNeedsIdentifiedSection && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
640652
<>
641653
<Heading level={2}>
642654
{strings.needsIdentifiedSectionHeading}
@@ -660,7 +672,7 @@ export function Component() {
660672
)}
661673
</>
662674
)}
663-
{showOperationStrategySection && (
675+
{showOperationStrategySection && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
664676
<>
665677
<Heading level={2}>
666678
{strings.operationalStrategySectionHeading}
@@ -685,7 +697,7 @@ export function Component() {
685697
)}
686698
</>
687699
)}
688-
{showTargetingStrategySection && (
700+
{showTargetingStrategySection && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
689701
<>
690702
<Heading level={2}>
691703
{strings.targetingStrategySectionHeading}
@@ -710,83 +722,85 @@ export function Component() {
710722
)}
711723
</>
712724
)}
713-
<Container
714-
heading={strings.targetPopulationSectionHeading}
715-
headingLevel={2}
716-
childrenContainerClassName={styles.targetPopulationContent}
717-
>
718-
{drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && (
725+
{drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
726+
<Container
727+
heading={strings.targetPopulationSectionHeading}
728+
headingLevel={2}
729+
childrenContainerClassName={styles.targetPopulationContent}
730+
>
731+
{drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && (
732+
<BlockTextOutput
733+
label={strings.womenLabel}
734+
value={drefResponse?.assisted_num_of_women}
735+
valueType="number"
736+
strongValue
737+
/>
738+
)}
719739
<BlockTextOutput
720-
label={strings.womenLabel}
721-
value={drefResponse?.assisted_num_of_women}
740+
label={strings.ruralLabel}
741+
value={drefResponse?.people_per_local}
722742
valueType="number"
743+
suffix="%"
723744
strongValue
724745
/>
725-
)}
726-
<BlockTextOutput
727-
label={strings.ruralLabel}
728-
value={drefResponse?.people_per_local}
729-
valueType="number"
730-
suffix="%"
731-
strongValue
732-
/>
733-
{drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && (
746+
{drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && (
747+
<BlockTextOutput
748+
label={strings.girlsLabel}
749+
value={drefResponse?.assisted_num_of_girls_under_18}
750+
valueType="number"
751+
strongValue
752+
/>
753+
)}
734754
<BlockTextOutput
735-
label={strings.girlsLabel}
736-
value={drefResponse?.assisted_num_of_girls_under_18}
755+
label={strings.urbanLabel}
756+
value={drefResponse?.people_per_urban}
757+
suffix="%"
737758
valueType="number"
738759
strongValue
739760
/>
740-
)}
741-
<BlockTextOutput
742-
label={strings.urbanLabel}
743-
value={drefResponse?.people_per_urban}
744-
suffix="%"
745-
valueType="number"
746-
strongValue
747-
/>
748-
{drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && (
761+
{drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && (
762+
<BlockTextOutput
763+
label={strings.menLabel}
764+
value={drefResponse?.assisted_num_of_men}
765+
valueType="number"
766+
strongValue
767+
/>
768+
)}
749769
<BlockTextOutput
750-
label={strings.menLabel}
751-
value={drefResponse?.assisted_num_of_men}
770+
className={styles.disabilitiesPopulation}
771+
label={strings.peopleWithDisabilitiesLabel}
772+
value={drefResponse?.disability_people_per}
773+
suffix="%"
752774
valueType="number"
753775
strongValue
754776
/>
755-
)}
756-
<BlockTextOutput
757-
className={styles.disabilitiesPopulation}
758-
label={strings.peopleWithDisabilitiesLabel}
759-
value={drefResponse?.disability_people_per}
760-
suffix="%"
761-
valueType="number"
762-
strongValue
763-
/>
764-
{drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && (
777+
{drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && (
778+
<BlockTextOutput
779+
label={strings.boysLabel}
780+
value={drefResponse?.assisted_num_of_boys_under_18}
781+
valueType="number"
782+
strongValue
783+
/>
784+
)}
785+
<div className={styles.emptyBlock} />
765786
<BlockTextOutput
766-
label={strings.boysLabel}
767-
value={drefResponse?.assisted_num_of_boys_under_18}
787+
className={styles.metaItem}
788+
label={strings.totalAssistedPopulationLabel}
789+
value={drefResponse?.num_assisted}
768790
valueType="number"
769791
strongValue
770792
/>
771-
)}
772-
<div className={styles.emptyBlock} />
773-
<BlockTextOutput
774-
className={styles.metaItem}
775-
label={strings.totalAssistedPopulationLabel}
776-
value={drefResponse?.num_assisted}
777-
valueType="number"
778-
strongValue
779-
/>
780-
<div className={styles.emptyBlock} />
781-
<BlockTextOutput
782-
label={strings.targetedPopulationLabel}
783-
value={drefResponse?.total_targeted_population}
784-
valueClassName={styles.totalTargetedPopulationValue}
785-
valueType="number"
786-
strongValue
787-
/>
788-
</Container>
789-
{showRiskAndSecuritySection && (
793+
<div className={styles.emptyBlock} />
794+
<BlockTextOutput
795+
label={strings.targetedPopulationLabel}
796+
value={drefResponse?.total_targeted_population}
797+
valueClassName={styles.totalTargetedPopulationValue}
798+
valueType="number"
799+
strongValue
800+
/>
801+
</Container>
802+
)}
803+
{showRiskAndSecuritySection && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
790804
<Container
791805
childrenContainerClassName={styles.riskAndSecuritySection}
792806
heading={strings.riskAndSecuritySectionHeading}
@@ -876,7 +890,7 @@ export function Component() {
876890
)}
877891
</Container>
878892
)}
879-
{plannedInterventionDefined && (
893+
{plannedInterventionDefined && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && (
880894
<>
881895
<Heading level={2}>
882896
{strings.interventionSectionHeading}

app/src/views/DrefFinalReportForm/EventDetail/i18n.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
{
22
"namespace": "drefFinalReportForm",
33
"strings": {
4-
"drefFormApproximateDateOfImpact": "Approximate date of impact",
54
"drefFormDescriptionEvent": "Description of the Event",
65
"drefFormEventDate": "Date of the Event",
7-
"drefFormImminentDisaster": "Provide any updates in the situation since the field report and explain what is expected to happen.",
6+
"drefFormImminentDisaster": "Update regarding the event’s development.",
7+
"drefFormImminentDisasterGuidance": "In case of the event not materializing please explain why not.",
88
"drefFormWhatWhereWhenDescriptionHeading": "Clearly Describe:",
99
"drefFormWhatWhereWhenDescriptionPoint1": "What happened: Briefly explain the nature of the emergency (e.g., flood, earthquake, epidemic). Include key details such as the intensity, and any unique aspects of the event.",
1010
"drefFormWhatWhereWhenDescriptionPoint2": "Where: Specify the geographic location(s) affected. Be as precise as possible, including names of countries, regions, cities, or specific areas impacted by the event.",
1111
"drefFormWhatWhereWhenDescriptionPoint3": "When: Indicate the date and time when the event occurred or began. If the situation is ongoing, mention that and provide relevant updates on the timeframe.",
1212
"drefFormScopeAndScaleDescription": "Describe the extent this hazard will produce negative impacts on lives, livelihoods, well-being and infrastructure. Explain which people are most likely to experience the impacts of this hazard? Where do they live, and why are they vulnerable? Please explain which groups (e.g elderly, children, people with disabilities, IDPs, Refugees, etc.) are most likely to be affected? Provide historic information on how communities have been affected by the magnitude of this hazard in the past?",
1313
"drefFormScopeAndScaleEvent": "Scope and scale of the event",
14+
"drefFormEventsImpact": "Events impact",
15+
"drefFormEventsImpactDescription": "In case of the even not materializing omit this section",
1416
"drefFormSlowEventDate": "Date when the trigger was met",
1517
"drefFormUploadPhotos": "Upload photos (e.g. impact of the events, NS in the field, assessments)",
1618
"drefFormUploadPhotosLimitation": "Add maximum 4 photos",
1719
"drefFormWhatWhereWhen": "What happened, where and when?",
1820
"drefFinalReportFormSelectImages": "Select images",
1921
"numericDetails": "Numeric Details",
20-
"drefFormRiskPeopleLabel": "Total population at risk",
22+
"drefFormRiskPeopleLabel": "Total population at risk (if available)",
2123
"drefFormClickEmergencyResponseFramework": "Click to view Emergency Response Framework",
2224
"drefFormPeopleAffected": "Total affected population",
2325
"drefFormAffectedMaleLabel": "Estimated male affected",
@@ -26,7 +28,6 @@
2628
"drefFormAffectedMinorBoysLabel": "Estimated Boys (under 18)",
2729
"drefFormPeopleAffectedDescriptionImminent": "Includes all those whose lives and livelihoods are at risk as a direct result of the shock or stress.",
2830
"drefFormPeopleAffectedDescriptionSlowSudden": "People Affected include all those whose lives and livelihoods have been impacted as a direct result of the shock or stress.",
29-
"drefFormEstimatedPeopleInNeed": "Estimated people in need (Optional)",
3031
"drefFormPeopleInNeed": "People in need (Optional)",
3132
"drefFormPeopleInNeedDescriptionImminent": "Include all those whose physical security, basic rights, dignity, living conditions or livelihoods are threatened or have been disrupted, and whose current level of access to basic services, goods and social protection will be inadequate to re-establish normal living conditions without additional assistance",
3233
"drefFormPeopleInNeedDescriptionSlowSudden": "People in Need (PIN) are those members whose physical security, basic rights, dignity, living conditions or livelihoods are threatened or have been disrupted, and whose current level of access to basic services, goods and social protection is inadequate to re-establish normal living conditions without additional assistance.",

0 commit comments

Comments
 (0)