From 5a3aa6a1205a6f16270b285c7ba110cab0b39280 Mon Sep 17 00:00:00 2001 From: samshara Date: Mon, 10 Feb 2025 15:11:25 +0545 Subject: [PATCH] Revert DREF Imminent Changes --- .../domain/DrefExportModal/i18n.json | 5 +- .../domain/DrefExportModal/index.tsx | 145 +-- .../domain/DrefExportModal/styles.module.css | 6 - .../domain/RiskSeasonalMap/i18n.json | 3 +- .../domain/RiskSeasonalMap/index.tsx | 3 +- .../ActiveDrefTable/index.tsx | 1 - .../DrefTableActions/index.tsx | 4 - .../DrefApplicationExport/PgaExport/i18n.json | 41 - .../DrefApplicationExport/PgaExport/index.tsx | 187 ---- .../PgaExport/styles.module.css | 34 - app/src/views/DrefApplicationExport/i18n.json | 24 +- app/src/views/DrefApplicationExport/index.tsx | 642 ++++---------- .../DrefApplicationExport/styles.module.css | 47 +- .../DrefApplicationForm/Actions/i18n.json | 3 + .../DrefApplicationForm/Actions/index.tsx | 18 +- .../DrefApplicationForm/EventDetail/i18n.json | 19 +- .../DrefApplicationForm/EventDetail/index.tsx | 162 ++-- .../Operation/ProposedActionsInput/i18n.json | 8 - .../Operation/ProposedActionsInput/index.tsx | 111 --- .../ProposedActionsInput/styles.module.css | 25 - .../DrefApplicationForm/Operation/i18n.json | 25 +- .../DrefApplicationForm/Operation/index.tsx | 836 +++++------------- .../Operation/styles.module.css | 2 +- .../DrefApplicationForm/Overview/i18n.json | 4 +- .../DrefApplicationForm/Overview/index.tsx | 109 +-- .../DrefApplicationForm/Submission/index.tsx | 7 +- app/src/views/DrefApplicationForm/common.tsx | 44 +- app/src/views/DrefApplicationForm/i18n.json | 2 - app/src/views/DrefApplicationForm/index.tsx | 66 +- app/src/views/DrefApplicationForm/schema.ts | 147 +-- 30 files changed, 618 insertions(+), 2112 deletions(-) delete mode 100644 app/src/components/domain/DrefExportModal/styles.module.css delete mode 100644 app/src/views/DrefApplicationExport/PgaExport/i18n.json delete mode 100644 app/src/views/DrefApplicationExport/PgaExport/index.tsx delete mode 100644 app/src/views/DrefApplicationExport/PgaExport/styles.module.css delete mode 100644 app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/i18n.json delete mode 100644 app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/index.tsx delete mode 100644 app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/styles.module.css diff --git a/app/src/components/domain/DrefExportModal/i18n.json b/app/src/components/domain/DrefExportModal/i18n.json index 9f20ad6d74..0b970146a9 100644 --- a/app/src/components/domain/DrefExportModal/i18n.json +++ b/app/src/components/domain/DrefExportModal/i18n.json @@ -7,9 +7,6 @@ "drefExportFailed": "Export failed", "drefExportSuccessfully": "Export completed successfully", "drefClickDownloadLink": "Click on the download link below!", - "drefDownloadPDF": "Download PDF", - "drefDownloadPDFWithPGA": "Download PDF with PGA", - "drefDownloadPDFwithoutPGA": "Download PDF without PGA", - "drefFailureToExportMessage":"Failed to export PDF." + "drefDownloadPDF": "Download PDF" } } \ No newline at end of file diff --git a/app/src/components/domain/DrefExportModal/index.tsx b/app/src/components/domain/DrefExportModal/index.tsx index ddc75a3f64..31b0b561a6 100644 --- a/app/src/components/domain/DrefExportModal/index.tsx +++ b/app/src/components/domain/DrefExportModal/index.tsx @@ -1,11 +1,8 @@ import { - useCallback, useMemo, useState, } from 'react'; import { - Button, - Checkbox, Message, Modal, } from '@ifrc-go/ui'; @@ -17,18 +14,9 @@ import { import Link from '#components/Link'; import { type components } from '#generated/types'; -import useAlert from '#hooks/useAlert'; -import { - DREF_TYPE_IMMINENT, - type TypeOfDrefEnum, -} from '#utils/constants'; -import { - useLazyRequest, - useRequest, -} from '#utils/restRequest'; +import { useRequest } from '#utils/restRequest'; import i18n from './i18n.json'; -import styles from './styles.module.css'; type ExportTypeEnum = components<'read'>['schemas']['ExportTypeEnum']; type ExportStatusEnum = components<'read'>['schemas']['ExportStatusEnum']; @@ -41,7 +29,6 @@ interface Props { id: number; onCancel: () => void; applicationType: 'DREF' | 'OPS_UPDATE' | 'FINAL_REPORT'; - drefType?: TypeOfDrefEnum | null; } function DrefExportModal(props: Props) { @@ -49,40 +36,11 @@ function DrefExportModal(props: Props) { id, onCancel, applicationType, - drefType, } = props; const strings = useTranslation(i18n); - const alert = useAlert(); const [exportId, setExportId] = useState(); - const [isPga, setIsPga] = useState(false); - const [isPgaCheckboxVisible, setIsPgaCheckboxVisible] = useState(true); - - const drefExportTriggerBody = useMemo( - () => { - let type: ExportTypeEnum; - if (applicationType === 'OPS_UPDATE') { - type = 'dref-operational-updates'; - } else if (applicationType === 'FINAL_REPORT') { - type = 'dref-final-reports'; - } else { - type = 'dref-applications'; - } - return { - export_id: id, - export_type: type, - is_pga: isPga, - selector: '#pdf-preview-ready', - per_country: undefined, - }; - }, - [ - id, - isPga, - applicationType, - ], - ); const exportTriggerBody = useMemo( () => { @@ -102,39 +60,14 @@ function DrefExportModal(props: Props) { per_country: undefined, // FIXME: typing is altered by the useRequest function }; }, - [ - id, - applicationType, - ], + [id, applicationType], ); - const { - pending: pendingDrefImminentExportTrigger, - error: drefImminentExportError, - trigger: drefImminentExportTrigger, - } = useLazyRequest({ - method: 'POST', - useCurrentLanguageForMutation: true, - url: '/api/v2/pdf-export/', - body: drefExportTriggerBody, - onSuccess: (response) => { - if (isDefined(response.id)) { - setExportId(response.id); - } - }, - onFailure: () => { - alert.show( - strings.drefFailureToExportMessage, - { variant: 'danger' }, - ); - }, - }); - const { pending: pendingExportTrigger, error: exportTriggerError, } = useRequest({ - skip: isDefined(exportId) || isNotDefined(id) || drefType === DREF_TYPE_IMMINENT, + skip: isDefined(exportId) || isNotDefined(id), method: 'POST', useCurrentLanguageForMutation: true, url: '/api/v2/pdf-export/', @@ -144,12 +77,6 @@ function DrefExportModal(props: Props) { setExportId(response.id); } }, - onFailure: () => { - alert.show( - strings.drefFailureToExportMessage, - { variant: 'danger' }, - ); - }, }); const { @@ -170,40 +97,18 @@ function DrefExportModal(props: Props) { }, }); - const handleDrefImminent = useCallback(() => { - setIsPgaCheckboxVisible(false); - drefImminentExportTrigger(drefExportTriggerBody); - }, [ - drefExportTriggerBody, - drefImminentExportTrigger, - ]); - return ( - {drefType === DREF_TYPE_IMMINENT - && isPgaCheckboxVisible - && !(pendingExportTrigger - || pendingExportStatus - || exportStatusResponse?.status === EXPORT_STATUS_PENDING) - && ( - - )} - {pendingExportTrigger && pendingDrefImminentExportTrigger && ( + {pendingExportTrigger && ( )} - {(pendingExportStatus - || exportStatusResponse?.status === EXPORT_STATUS_PENDING) && ( + {(pendingExportStatus || exportStatusResponse?.status === EXPORT_STATUS_PENDING) && ( )} - {!(pendingExportTrigger - || pendingExportStatus - || exportStatusResponse?.status === EXPORT_STATUS_PENDING) - && drefType === DREF_TYPE_IMMINENT - && !drefImminentExportError && ( - exportStatusResponse?.pdf_file ? ( - - {strings.drefDownloadPDF} - - )} - /> - ) : (!exportStatusResponse && ( -
- -
- )) - )} {isDefined(exportStatusResponse) && exportStatusResponse.status === EXPORT_STATUS_COMPLETED - && isDefined(exportStatusResponse.pdf_file) - && drefType !== DREF_TYPE_IMMINENT && ( + && isDefined(exportStatusResponse.pdf_file) && ( } {!dataPending && (isNotDefined(filteredData) || filteredData?.length === 0) && ( )} {/* FIXME: use List */} diff --git a/app/src/views/AccountMyFormsDref/ActiveDrefTable/index.tsx b/app/src/views/AccountMyFormsDref/ActiveDrefTable/index.tsx index e871bf0275..c637eb963e 100644 --- a/app/src/views/AccountMyFormsDref/ActiveDrefTable/index.tsx +++ b/app/src/views/AccountMyFormsDref/ActiveDrefTable/index.tsx @@ -259,7 +259,6 @@ function ActiveDrefTable(props: Props) { canCreateFinalReport, hasPermissionToApprove: isRegionCoordinator || userMe?.is_superuser, onPublishSuccess: refetchActiveDref, - drefType: item.type_of_dref, }; }, { columnClassName: styles.actions }, diff --git a/app/src/views/AccountMyFormsDref/DrefTableActions/index.tsx b/app/src/views/AccountMyFormsDref/DrefTableActions/index.tsx index 4ad6d74003..01e2e4df89 100644 --- a/app/src/views/AccountMyFormsDref/DrefTableActions/index.tsx +++ b/app/src/views/AccountMyFormsDref/DrefTableActions/index.tsx @@ -31,7 +31,6 @@ import { DREF_TYPE_IMMINENT, DREF_TYPE_LOAN, type DrefStatus, - type TypeOfDrefEnum, } from '#utils/constants'; import { type GoApiBody, @@ -54,7 +53,6 @@ export interface Props { hasPermissionToApprove?: boolean; onPublishSuccess?: () => void; - drefType: TypeOfDrefEnum | null | undefined; } function DrefTableActions(props: Props) { @@ -67,7 +65,6 @@ function DrefTableActions(props: Props) { canCreateFinalReport, hasPermissionToApprove, onPublishSuccess, - drefType, } = props; const { navigate } = useRouting(); @@ -500,7 +497,6 @@ function DrefTableActions(props: Props) { onCancel={setShowExportModalFalse} id={id} applicationType={applicationType} - drefType={drefType} /> )} {showShareModal && ( diff --git a/app/src/views/DrefApplicationExport/PgaExport/i18n.json b/app/src/views/DrefApplicationExport/PgaExport/i18n.json deleted file mode 100644 index 07cae9c5d5..0000000000 --- a/app/src/views/DrefApplicationExport/PgaExport/i18n.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "namespace": "drefApplicationExport", - "strings": { - "imminentDREFRequestHeading": "Imminent DREF Request and Obligations", - "requestHeading": "Request:", - "requestDescription": "The National Society hereby requests an Imminent DREF funding of CHF 75,000 to implement anticipatory actions to mitigate the risk of the foreseen disaster and possibly a few immediate response activities should the disaster materialize.", - "nationalSocietyHeading": "National Society Obligations:", - "nationalSocietyDescriptionOne": "The National Society commits to use the Imminent DREF funding solely for the proposed activities as per the budget indicated on page 1 and in accordance with the DREF Guidelines.", - "nationalSocietyDescriptionTwo": "The maximum timeframe for implementing the proposed activities shall be 45 days after the date of approval of the Imminent DREF request, with no possibility of extension.", - "nationalSocietyDescriptionThree": "In the event the foreseen disaster materializes, and the National Society requires additional funding from the DREF,", - "nationalSocietyDescriptionFour": "The National Society shall promptly but no later than 14 days from the date of the disaster occurrence, submit a DREF application for the next operation (using the Operations Update form via GO). Upon approval of the response DREF application, the National Society shall promptly but no later than 15 days from receiving the Project Funding Agreement from the IFRC, sign such Project Funding Agreement.", - "nationalSocietyDescriptionFive": "The Project Funding Agreement shall indicate the amount already paid out as Imminent DREF funding which shall be included in the total DREF cap allocation.", - "nationalSocietyDescriptionSix": "The DREF application budget shall reflect the full funding needed for the operation, including the activities carried out using the Imminent DREF funding.", - "nationalSocietyDescriptionSeven": "The National Society shall provide the following reports:", - "nationalSocietyDescriptionEight": "two narrative reports:", - "nationalSocietyDescriptionNine": "Operations Update to scale up through response DREF request and update on Imminent DREF implemented activities", - "nationalSocietyDescriptionTen": "Imminent DREF and response DREF report in one common final report", - "nationalSocietyDescriptionEleven": "One financial report of the final Imminent DREF and the response DREF operations.", - "nationalSocietyDescriptionTwelve": "In the event the disaster materializes, however the National Society does not wish to request international support, the National Society shall:", - "nationalSocietyDescriptionThirteen": "Provide a final financial and narrative report on the use of the Imminent DREF request within 30 days after the 45 days implementation period set out in paragraph 4 above,", - "nationalSocietyDescriptionFourteen": "In the event the disaster does not materialize, the National Society shall:", - "nationalSocietyDescriptionFifteen": "Refund the amount dedicated to immediate response activities of the Imminent DREF request within 30 days after the implementation period set out in paragraph 4 above.", - "nationalSocietyDescriptionSixteen": "By signing this Imminent DREF request, the National Society commits to zero tolerance for, and shall take appropriate measures against, fraud, corruption, and any form of abuse against any person, in particular children, including without limitation sexual exploitation, abuse and harassment. The IFRC reserves the right to perform audits, financial reviews, checks and verifications and/or investigations to ensure the proper use of the Imminent DREF and compliance with the above-mentioned obligations. In order to facilitate such audits, financial reviews, checks and verifications and/or investigations, the National Society shall grant the IFRC access to its documents, records, and premises as well as its staff, agents, volunteers, beneficiaries, sub-grantees and contractors. Any breach of the above obligations shall entitle the IFRC to request a full refund of this Imminent DREF request.", - "nationalSocietyBankDetails": "Bank details of the National Society", - "nationalSocietyBankDescription": "to which the IFRC shall transfer the funds will be transferred.", - "nationalSocietyBankName": "Bank Name and Address", - "nationalSocietyBankAccountNumber": "Bank Account Number and Currency", - "nationalSocietySwiftCode": "IBAN / SWIFT Code", - "nationalSocietyAmount": "Amount(CHF)", - "nationalSocietyAmountCHF": "CHF 75,000/CHF 90800", - "nationalSocietyAdvancePayment": "For the Purpose of Advance Payment", - "nationalSocietyBankFooter": "Please find attached letter from the Bank confirming banking relationship details.", - "imminentDrefRequest": "This Imminent DREF request is signed on behalf of:", - "imminentDrefSigned": "SIGNED by the authorised representative of the National Society", - "imminentIFRCSigned": "SIGNED by the authorised representative of the IFRC", - "imminentSignature": "Signature", - "imminentPrintedSignatory": "Printed Signatory's Name", - "imminentTitle": "Title", - "imminentDate": "Date" - } -} \ No newline at end of file diff --git a/app/src/views/DrefApplicationExport/PgaExport/index.tsx b/app/src/views/DrefApplicationExport/PgaExport/index.tsx deleted file mode 100644 index 8f4c429676..0000000000 --- a/app/src/views/DrefApplicationExport/PgaExport/index.tsx +++ /dev/null @@ -1,187 +0,0 @@ -import { useTranslation } from '@ifrc-go/ui/hooks'; -import { - Container, - DescriptionText, - Heading, - Signature, - TextOutput, - type TextOutputProps, -} from '@ifrc-go/ui/printable'; - -import i18n from './i18n.json'; -import styles from './styles.module.css'; - -export function BlockTextOutput(props: TextOutputProps - & { variant?: never, withoutLabelColon?: never }) { - return ( - - ); -} - -function PgaExport() { - const strings = useTranslation(i18n); - - return ( -
- - {strings.imminentDREFRequestHeading} - - - -
    -
  1. - {strings.requestDescription} -
  2. -
-
-
- - -
    -
  1. - {strings.nationalSocietyDescriptionOne} -
  2. -
  3. - {strings.nationalSocietyDescriptionTwo} -
  4. -
  5. - {strings.nationalSocietyDescriptionThree} -
      -
    1. - {strings.nationalSocietyDescriptionFour} -
    2. -
    3. - {strings.nationalSocietyDescriptionFive} -
    4. -
    5. - {strings.nationalSocietyDescriptionSix} -
    6. -
    7. - {strings.nationalSocietyDescriptionSeven} -
        -
      1. - {strings.nationalSocietyDescriptionEight} -
        - {strings.nationalSocietyDescriptionNine} -
      2. -
      3. - {strings.nationalSocietyDescriptionTen} -
        - {strings.nationalSocietyDescriptionEleven} -
      4. -
      -
    8. -
    -
  6. -
  7. - {strings.nationalSocietyDescriptionTwelve} -
      -
    1. - {strings.nationalSocietyDescriptionThirteen} -
    2. -
    -
  8. -
  9. - {strings.nationalSocietyDescriptionFourteen} -
      -
    1. - {strings.nationalSocietyDescriptionThirteen} -
    2. -
    3. - {strings.nationalSocietyDescriptionFifteen} -
    4. -
    -
  10. -
-
-
- - - {strings.nationalSocietyDescriptionSixteen} - - - - - {strings.nationalSocietyBankDescription} - -
- - - - - -
- {strings.nationalSocietyBankFooter} -
- -
- - - - - - - - - - -
-
-
- ); -} - -export default PgaExport; diff --git a/app/src/views/DrefApplicationExport/PgaExport/styles.module.css b/app/src/views/DrefApplicationExport/PgaExport/styles.module.css deleted file mode 100644 index fb10e9f797..0000000000 --- a/app/src/views/DrefApplicationExport/PgaExport/styles.module.css +++ /dev/null @@ -1,34 +0,0 @@ -.pga-export { - .page-break { - break-before: page; - } - - .description { - margin: 0; - padding-inline-start: var(--go-ui-spacing-sm); - } - - .table-description { - font-weight: var(--go-ui-font-weight-bold); - } - - .bank-details { - display: grid; - grid-gap: var(--go-ui-width-separator-md); - grid-template-columns: 1fr 1fr; - page-break-inside: avoid; - } - - .dref-signed { - display: grid; - grid-gap: var(--go-ui-spacing-xl); - grid-template-columns: 1fr 1fr; - page-break-inside: avoid; - - .dref-table { - display: flex; - align-items: center; - flex-direction: column; - } - } -} diff --git a/app/src/views/DrefApplicationExport/i18n.json b/app/src/views/DrefApplicationExport/i18n.json index 4b938a0306..3417b09725 100644 --- a/app/src/views/DrefApplicationExport/i18n.json +++ b/app/src/views/DrefApplicationExport/i18n.json @@ -2,7 +2,6 @@ "namespace": "drefApplicationExport", "strings": { "exportTitle": "DREF Operation", - "exportDrefImminentTitle": "Imminent DREF Operation", "appealLabel": "Appeal", "countryLabel": "Country", "hazardLabel": "Hazard", @@ -28,6 +27,7 @@ "whatWhereWhenSectionHeading": "What happened, where and when?", "dateOfEventSlowHeading": "Date of event", "dateWhenTriggerWasMetHeading": "Date when the trigger was met", + "situationUpdateSectionHeading": "Provide any updates in the situation since the field report and explain what is expected to happen.", "anticipatoryActionsHeading": "Why your National Society is acting now and what criteria is used to launch this operation.", "scopeAndScaleSectionHeading": "Scope and Scale", "previousOperationsSectionHeading": "Previous Operations", @@ -39,6 +39,7 @@ "recurrentEventJustificationLabel": "If you have answered yes to all questions above, justify why the use of DREF for a recurrent event, or how this event should not be considered recurrent", "lessonsLearnedLabel": "Lessons learned", "currentNationalSocietyActionsHeading": "Current National Society Actions", + "nationalSocietyActionsHeading": "National Society anticipatory actions started", "drefFormNsResponseStarted": "Start date of National Society actions", "movementPartnersActionsHeading": "IFRC Network Actions Related To The Current Event", "secretariatLabel": "Secretariat", @@ -80,7 +81,6 @@ "aboutSupportServicesSectionHeading": "About Support Services", "humanResourcesHeading": "How many staff and volunteers will be involved in this operation. Briefly describe their role.", "surgePersonnelDeployedHeading": "Will surge personnel be deployed? Please provide the role profile needed.", - "humanitarianImpactsHeading": "Which of the expected severe humanitarian impacts of the hazard are your actions addressing? Why were these impacts chosen?", "logisticCapacityHeading": "If there is procurement, will it be done by National Society or IFRC?", "pmerHeading": "How will this operation be monitored?", "communicationHeading": "Please briefly explain the National Societies communication strategy for this operation", @@ -101,24 +101,6 @@ "sourceInformationSourceNameTitle": "Source Name", "sourceInformationSourceLinkTitle": "Source Link", "crisisCategorySupportingDocumentLabel": "Crisis Category Supporting Document", - "targetingStrategySupportingDocument": "Targeting Strategy Supporting Document", - "contingencyPlanDocument": "National Society developed contingency plans, or recently carried out PER assessment Document", - "proposedActions": "Proposed Actions", - "proposedActionsActivities": "Activities", - "priorityActionsBudget": "Budget (CHF)", - "proposedActionsEarlyActions": "Early Actions", - "priorityActionsEarlyResponse": "Early Response", - "priorityActionsSubTotal": "Sub-total", - "priorityActionsSurgeDeployment": "Surge Deployment (if applicable)", - "priorityActionsIndirectCost": "Indirect Cost", - "priorityActionsTotal": "Total", - "scenarioAnalysis": "Scenario analysis", - "hazardDate": "When and where is the hazard expected to happen?", - "hazardRisk": "Explain the underlying vulnerabilities and risks the hazard poses for at-risk communities?", - "dateAndGeographicalArea": "(Date and geographical area)", - "sourceInformationAttachments": "Include the link to the source of information or indicate if shared as attachments.", - "plan": "Plan", - "plannedInterventionAltText": "Planned Intervention Image", - "planDescription": "If the National Society has developed contingency plans, or recently carried out PER assessment or readiness check for instance, kindly attached those documents to the request." + "targetingStrategySupportingDocument": "Targeting Strategy Supporting Document" } } diff --git a/app/src/views/DrefApplicationExport/index.tsx b/app/src/views/DrefApplicationExport/index.tsx index c8e344c58a..0f7b47f752 100644 --- a/app/src/views/DrefApplicationExport/index.tsx +++ b/app/src/views/DrefApplicationExport/index.tsx @@ -12,6 +12,7 @@ import { Heading, Image, TextOutput, + type TextOutputProps, } from '@ifrc-go/ui/printable'; import { DEFAULT_PRINT_DATE_FORMAT } from '@ifrc-go/ui/utils'; import { @@ -20,13 +21,10 @@ import { isFalsyString, isNotDefined, isTruthyString, - listToGroupList, } from '@togglecorp/fujs'; import ifrcLogo from '#assets/icons/ifrc-square.png'; import Link from '#components/printable/Link'; -import SelectOutput from '#components/SelectOutput'; -import useUrlSearchState from '#hooks/useUrlSearchState'; import { DISASTER_CATEGORY_ORANGE, DISASTER_CATEGORY_RED, @@ -34,7 +32,6 @@ import { type DisasterCategory, DREF_TYPE_ASSESSMENT, DREF_TYPE_IMMINENT, - DREF_TYPE_RESPONSE, ONSET_SLOW, } from '#utils/constants'; import { @@ -42,21 +39,21 @@ import { nsActionsOrder, plannedInterventionOrder, } from '#utils/domain/dref'; -import { - type GoApiResponse, - useRequest, -} from '#utils/restRequest'; -import { - EARLY_ACTIONS, - EARLY_RESPONSE, -} from '#views/DrefApplicationForm/common'; - -import PgaExport, { BlockTextOutput } from './PgaExport'; +import { useRequest } from '#utils/restRequest'; import i18n from './i18n.json'; import styles from './styles.module.css'; -type ActivityOptions = NonNullable>[number]; +function BlockTextOutput(props: TextOutputProps & { variant?: never, withoutLabelColon?: never }) { + return ( + + ); +} const colorMap: Record = { [DISASTER_CATEGORY_YELLOW]: styles.yellow, @@ -64,14 +61,6 @@ const colorMap: Record = { [DISASTER_CATEGORY_RED]: styles.red, }; -function activityLabelSelector(option: ActivityOptions) { - return option.label; -} - -function activityKeySelector(option: ActivityOptions) { - return option.key; -} - /** @knipignore */ // eslint-disable-next-line import/prefer-default-export export function Component() { @@ -80,12 +69,7 @@ export function Component() { const strings = useTranslation(i18n); const { - response: activityOptionResponse, - } = useRequest({ - url: '/api/v2/primarysector', - }); - - const { + // pending: fetchingDref, response: drefResponse, } = useRequest({ skip: isFalsyString(drefId), @@ -195,35 +179,32 @@ export function Component() { [drefResponse], ); - const eventDescriptionDefined = isDefined(drefResponse) - && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT - && isTruthyString(drefResponse?.event_description?.trim()); - const eventScopeDefined = drefResponse?.type_of_dref === DREF_TYPE_RESPONSE + const eventDescriptionDefined = isTruthyString(drefResponse?.event_description?.trim()); + const eventScopeDefined = drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && isTruthyString(drefResponse?.event_scope?.trim()); const sourceInformationDefined = isDefined(drefResponse) && isDefined(drefResponse.source_information) - && drefResponse.source_information.length > 0; + && drefResponse.source_information.length > 0; const imagesFileDefined = isDefined(drefResponse) - && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && isDefined(drefResponse.images_file) && drefResponse.images_file.length > 0; + const anticipatoryActionsDefined = drefResponse?.type_of_dref === DREF_TYPE_IMMINENT + && isTruthyString(drefResponse?.anticipatory_actions?.trim()); const eventDateDefined = drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && isDefined(drefResponse?.event_date); + const eventTextDefined = drefResponse?.type_of_dref === DREF_TYPE_IMMINENT + && isTruthyString(drefResponse?.event_text?.trim()); const showEventDescriptionSection = eventDescriptionDefined || eventScopeDefined || imagesFileDefined + || anticipatoryActionsDefined + || eventTextDefined || eventDateDefined || sourceInformationDefined || isDefined(drefResponse?.event_map_file?.file); - const hazardDate = drefResponse?.type_of_dref === DREF_TYPE_IMMINENT - && isDefined(drefResponse?.hazard_date_and_location); - const hazardRisk = drefResponse?.type_of_dref === DREF_TYPE_IMMINENT - && drefResponse.hazard_vulnerabilities_and_risks; - const showScenarioAnalysis = hazardDate || hazardRisk; - const lessonsLearnedDefined = isTruthyString(drefResponse?.lessons_learned?.trim()); - const showPreviousOperations = drefResponse?.type_of_dref === DREF_TYPE_RESPONSE && ( + const showPreviousOperations = drefResponse?.type_of_dref !== DREF_TYPE_ASSESSMENT && ( isDefined(drefResponse?.did_it_affect_same_area) || isDefined(drefResponse?.did_it_affect_same_population) || isDefined(drefResponse?.did_ns_respond) @@ -235,23 +216,14 @@ export function Component() { const ifrcActionsDefined = isTruthyString(drefResponse?.ifrc?.trim()); const partnerNsActionsDefined = isTruthyString(drefResponse?.partner_national_society?.trim()); - const showMovementPartnersActionsSection = isDefined(drefResponse) - && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT - && (ifrcActionsDefined || partnerNsActionsDefined); - - const proposedActionsDefined = isDefined(drefResponse) - && drefResponse?.type_of_dref === DREF_TYPE_IMMINENT - && drefResponse?.proposed_action; + const showMovementPartnersActionsSection = ifrcActionsDefined || partnerNsActionsDefined; const showNsAction = isDefined(drefResponse) - && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && isDefined(drefResponse.national_society_actions) && drefResponse.national_society_actions.length > 0 && isDefined(nsActions); - const icrcActionsDefined = isDefined(drefResponse) - && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT - && isTruthyString(drefResponse?.icrc?.trim()); + const icrcActionsDefined = isTruthyString(drefResponse?.icrc?.trim()); const governmentRequestedAssistanceDefined = isDefined( drefResponse?.government_requested_assistance, @@ -261,9 +233,7 @@ export function Component() { const majorCoordinationMechanismDefined = isDefined( drefResponse?.major_coordination_mechanism?.trim(), ); - const showOtherActorsActionsSection = (governmentRequestedAssistanceDefined - && isDefined(drefResponse) - && drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT) + const showOtherActorsActionsSection = governmentRequestedAssistanceDefined || nationalAuthoritiesDefined || unOrOtherActorDefined || majorCoordinationMechanismDefined; @@ -281,84 +251,53 @@ export function Component() { const showNeedsIdentifiedSection = isDefined(drefResponse) && drefResponse.type_of_dref !== DREF_TYPE_ASSESSMENT - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT && (identifiedGapsDefined || needsIdentifiedDefined || assessmentReportDefined); const operationObjectiveDefined = isTruthyString(drefResponse?.operation_objective?.trim()); const responseStrategyDefined = isTruthyString(drefResponse?.response_strategy?.trim()); - const showOperationStrategySection = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && (operationObjectiveDefined || responseStrategyDefined); + const showOperationStrategySection = operationObjectiveDefined || responseStrategyDefined; const peopleAssistedDefined = isTruthyString(drefResponse?.people_assisted?.trim()); const selectionCriteriaDefined = isTruthyString(drefResponse?.selection_criteria?.trim()); const targetingStrategySupportingDocumentDefined = isDefined( drefResponse?.targeting_strategy_support_file_details, ); - const showTargetingStrategySection = (isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && peopleAssistedDefined) + const showTargetingStrategySection = peopleAssistedDefined || selectionCriteriaDefined || targetingStrategySupportingDocumentDefined; const riskSecurityDefined = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT && isDefined(drefResponse.risk_security) && drefResponse.risk_security.length > 0; - const riskSecurityConcernDefined = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && isTruthyString(drefResponse?.risk_security_concern?.trim()); - const hasChildrenSafeguardingDefined = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && isDefined( - drefResponse?.has_child_safeguarding_risk_analysis_assessment, - ); + const riskSecurityConcernDefined = isTruthyString(drefResponse?.risk_security_concern?.trim()); + const hasChildrenSafeguardingDefined = isDefined( + drefResponse?.has_child_safeguarding_risk_analysis_assessment, + ); const showRiskAndSecuritySection = riskSecurityDefined || riskSecurityConcernDefined || hasChildrenSafeguardingDefined; const plannedInterventionDefined = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT && isDefined(drefResponse.planned_interventions) && drefResponse.planned_interventions.length > 0 && isDefined(plannedInterventions); - const humanResourceDefined = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && isTruthyString(drefResponse?.human_resource?.trim()); + const humanResourceDefined = isTruthyString(drefResponse?.human_resource?.trim()); const surgePersonnelDeployedDefined = isTruthyString( drefResponse?.surge_personnel_deployed?.trim(), ); - const humanitarianImpactsDefined = isDefined(drefResponse) - && drefResponse.type_of_dref === DREF_TYPE_IMMINENT - && isTruthyString(drefResponse?.addressed_humanitarian_impacts?.trim()); - const logisticCapacityOfNsDefined = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && isTruthyString( - drefResponse?.logistic_capacity_of_ns?.trim(), - ); - const pmerDefined = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && isTruthyString(drefResponse?.pmer?.trim()); - const communicationDefined = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && isTruthyString(drefResponse?.communication?.trim()); - const contingencyPlanDocument = isDefined(drefResponse) - && drefResponse.type_of_dref === DREF_TYPE_IMMINENT - && isTruthyString( - drefResponse?.contingency_plans_supporting_document_details?.file, - ); + const logisticCapacityOfNsDefined = isTruthyString( + drefResponse?.logistic_capacity_of_ns?.trim(), + ); + const pmerDefined = isTruthyString(drefResponse?.pmer?.trim()); + const communicationDefined = isTruthyString(drefResponse?.communication?.trim()); const showAboutSupportServicesSection = humanResourceDefined || surgePersonnelDeployedDefined || logisticCapacityOfNsDefined || pmerDefined - || communicationDefined - || humanitarianImpactsDefined - || contingencyPlanDocument; + || communicationDefined; - const showBudgetOverview = isDefined(drefResponse) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - && isTruthyString(drefResponse?.budget_file_details?.file); + const showBudgetOverview = isTruthyString(drefResponse?.budget_file_details?.file); const nsContactText = [ drefResponse?.national_society_contact_name, @@ -400,27 +339,6 @@ export function Component() { || projectManagerContactDefined || focalPointContactDefined || mediaContactDefined; - - const [pgaExport] = useUrlSearchState( - 'is_pga', - (value) => { - if (value === 'true') { - return true; - } - return undefined; - }, - (is_pga) => is_pga, - ); - - const proposedActionsByType = useMemo(() => ( - listToGroupList( - (drefResponse?.proposed_action ?? []).filter( - (proposed) => isDefined(proposed.proposed_type), - ), - (proposed) => proposed.proposed_type ?? 0, - ) - ), [drefResponse?.proposed_action]); - return (
@@ -430,15 +348,9 @@ export function Component() { alt={strings.imageLogoIFRCAlt} />
- {drefResponse?.type_of_dref === DREF_TYPE_IMMINENT ? ( - - {strings.exportDrefImminentTitle} - - ) : ( - - {strings.exportTitle} - - )} + + {strings.exportTitle} +
{drefResponse?.title}
@@ -480,43 +392,37 @@ export function Component() { value={drefResponse?.type_of_dref_display} strongValue /> - {drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && ( - - )} + - {drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && ( - - )} - {drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT && ( - - )} + + -
- {showScenarioAnalysis && ( + {showEventDescriptionSection && ( <> +
- {drefResponse.type_of_dref !== DREF_TYPE_IMMINENT - ? strings.eventDescriptionSectionHeading - : strings.scenarioAnalysis} + {strings.eventDescriptionSectionHeading} - {hazardDate && ( - - - {strings.dateAndGeographicalArea} - - - {drefResponse?.hazard_date_and_location} - - - )} - {hazardRisk && ( - - - {drefResponse?.hazard_vulnerabilities_and_risks} - - - )} - - )} - {showEventDescriptionSection && ( - <> - {drefResponse?.disaster_category_analysis_details?.file - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT && ( + {drefResponse?.disaster_category_analysis_details?.file && ( {strings.crisisCategorySupportingDocumentLabel} )} + {eventTextDefined && ( + + + {drefResponse?.event_text} + + + )} {eventDateDefined && ( )} - {isTruthyString(drefResponse?.event_map_file?.file) - && drefResponse.type_of_dref !== DREF_TYPE_IMMINENT && ( + {isTruthyString(drefResponse?.event_map_file?.file) && ( {drefResponse?.event_description} @@ -655,6 +541,15 @@ export function Component() { )} )} + {anticipatoryActionsDefined && ( + + + {drefResponse?.anticipatory_actions} + + + )} {eventScopeDefined && ( )} {sourceInformationDefined && ( - <> - - {strings.sourceInformationSectionHeading} - - - {strings.sourceInformationAttachments} - - -
- {strings.sourceInformationSourceNameTitle} -
-
- {strings.sourceInformationSourceLinkTitle} -
- {drefResponse?.source_information?.map( - (source, index) => ( - - -
- {`${index + 1}. ${source.source_name}`} -
-
- - - {source?.source_link} - - -
- ), - )} - -
- - )} - - )} - {showAboutSupportServicesSection && ( - <> - - {drefResponse?.type_of_dref !== DREF_TYPE_IMMINENT - ? strings.aboutSupportServicesSectionHeading - : strings.plan} - - {drefResponse?.type_of_dref === DREF_TYPE_IMMINENT && ( - - - {strings.planDescription} - - - )} - {humanResourceDefined && ( - - - {drefResponse?.human_resource} - - - )} - {humanitarianImpactsDefined && ( - - - {drefResponse?.addressed_humanitarian_impacts} - - - )} - {surgePersonnelDeployedDefined && ( - - {drefResponse?.surge_personnel_deployed} - - - )} - {contingencyPlanDocument && ( - - - {strings.contingencyPlanDocument} - - - )} - {logisticCapacityOfNsDefined && ( - - - {drefResponse?.logistic_capacity_of_ns} - - - )} - {pmerDefined && ( - - - {drefResponse?.pmer} - - - )} - {communicationDefined && ( - - - {drefResponse?.communication} - +
+ {strings.sourceInformationSourceNameTitle} +
+
+ {strings.sourceInformationSourceLinkTitle} +
+ {drefResponse?.source_information?.map( + (source, index) => ( + + +
+ {`${index + 1}. ${source.source_name}`} +
+
+ + + {source?.source_link} + + +
+ ), + )} +
)} @@ -850,7 +659,11 @@ export function Component() { {drefResponse?.ns_respond_date && ( )} - {proposedActionsDefined && ( - -
- - {strings.proposedActionsActivities} - - - {strings.priorityActionsBudget} - - - ( -
    -
  • - -
  • -
- ))} - withoutLabelColon - invalidText={null} - /> - ( - - ))} - withoutLabelColon - invalidText={null} - /> - - - ( -
    -
  • - -
  • -
- ))} - withoutLabelColon - invalidText={null} - /> - ( - - ))} - withoutLabelColon - invalidText={null} - /> -
- - -
- - -
- - -
- - - - )} {plannedIntervention.title_display} @@ -1388,6 +1052,58 @@ export function Component() { ))} )} + {showAboutSupportServicesSection && ( + <> + + {strings.aboutSupportServicesSectionHeading} + + {humanResourceDefined && ( + + + {drefResponse?.human_resource} + + + )} + {surgePersonnelDeployedDefined && ( + + + {drefResponse?.surge_personnel_deployed} + + + )} + {logisticCapacityOfNsDefined && ( + + + {drefResponse?.logistic_capacity_of_ns} + + + )} + {pmerDefined && ( + + + {drefResponse?.pmer} + + + )} + {communicationDefined && ( + + + {drefResponse?.communication} + + + )} + + )} {showBudgetOverview && ( <>
@@ -1463,12 +1179,6 @@ export function Component() { )} - {pgaExport && ( - <> -
- - - )} {previewReady &&
}
); diff --git a/app/src/views/DrefApplicationExport/styles.module.css b/app/src/views/DrefApplicationExport/styles.module.css index cd46313d8a..b5d8d81adc 100644 --- a/app/src/views/DrefApplicationExport/styles.module.css +++ b/app/src/views/DrefApplicationExport/styles.module.css @@ -228,49 +228,4 @@ color: var(--go-ui-color-primary-red); } } - - .bank-details { - display: grid; - grid-gap: var(--go-ui-width-separator-md); - grid-template-columns: 1fr 1fr; - page-break-inside: avoid; - } - - .actions-section { - display: grid; - grid-gap: var(--go-ui-width-separator-md); - grid-template-columns: 1fr 1fr 1fr; - - .actions-title { - display: flex; - flex-direction: column; - background-color: var(--pdf-element-bg); - padding: var(--go-ui-spacing-sm); - break-inside: avoid; - font-weight: var(--go-ui-font-weight-bold); - } - - .actions-item { - display: flex; - flex-direction: column; - background-color: var(--pdf-element-bg); - padding: var(--go-ui-spacing-xs); - break-inside: avoid; - } - - .cost-item { - display: flex; - flex-direction: column; - background-color: var(--pdf-element-bg); - padding: var(--go-ui-spacing-sm); - break-inside: avoid; - text-align: right; - } - } - - .cost-section { - display: grid; - grid-gap: var(--go-ui-width-separator-md); - grid-template-columns: 1fr 1fr; - } -} \ No newline at end of file +} diff --git a/app/src/views/DrefApplicationForm/Actions/i18n.json b/app/src/views/DrefApplicationForm/Actions/i18n.json index ed20e89834..845bbd444d 100644 --- a/app/src/views/DrefApplicationForm/Actions/i18n.json +++ b/app/src/views/DrefApplicationForm/Actions/i18n.json @@ -7,12 +7,14 @@ "drefFormCoordinationMechanism": "Are there major coordination mechanisms in place?", "drefFormCoordinationMechanismDescription": "List coordination mechanisms/platform in place at local/district and national level. Indicate the lead authorities/agencies. How the National Society is involved/positioned in this coordination. Does the NS in any lead/co-lead role? Any identified gap/overlap in the coordination (e.g., sector missing…)?", "drefFormActionDescription": "Description", + "drefFormDidNationalSocietyStartedImminent": "Did the National Society started any anticipatory actions?", "drefFormDidNationalSocietyStartedSlow": "Has the National Society started any actions?", "drefFormGapsInAssessment": "Any identified gaps/limitations in the assessment", "drefFormIcrc": "ICRC", "drefFormIcrcDescription": "Presence or not of ICRC in country, and support directly provided for this emergency response. Other programs and support provided outside of the scope of this emergency should not be indicated here.", "drefFormIfrc": "IFRC", "drefFormIfrcDescription": "Presence or not of IFRC in country (if not, indicate the cluster covering), support provided for this response, domestic coordination, technical, strategic, surge. Explain what support provided in terms of Secretariat services: PMER, Finance, Admin, HR, Security, logistics, NSD.", + "drefFormImminentNeedsIdentified": "Anticipated Needs", "drefFormInternationalAssistance": "Government has requested international assistance", "ifrcNetworkActionsHeading": "IFRC Network Actions Related To The Current Event", "icrcActionsHeading": "ICRC Actions Related To The Current Event", @@ -22,6 +24,7 @@ "drefFormNationalSocietiesActionsDescription": "Please indicate a description of the ongoing response with if possible: Branches involved, number of volunteers/staff involved in actions, assets deployed/distributed, number of people reach. Impact/added value of the NS in the response already ongoing.", "drefFormNationalSocietiesActionsLabel": "Select the actions that apply.", "drefFormNeedsIdentified": "Needs (Gaps) Identified", + "drefFormNSAnticipatoryAction": "National Society anticipatory actions started", "drefFormNsResponseStarted": "Start date of National Society actions", "drefFormPartnerNationalSociety": "Participating National Societies", "drefFormPartnerNationalSocietyDescription": "Briefly set out which PNS are present and give details of PNS contributions/roles on the ground and remotely for this specific operation", diff --git a/app/src/views/DrefApplicationForm/Actions/index.tsx b/app/src/views/DrefApplicationForm/Actions/index.tsx index f872d105a1..68615ecd44 100644 --- a/app/src/views/DrefApplicationForm/Actions/index.tsx +++ b/app/src/views/DrefApplicationForm/Actions/index.tsx @@ -198,7 +198,11 @@ function Actions(props: Props) { heading={strings.drefFormNationalSocietiesActions} > {value.did_national_society && ( {/* NOTE: Only when RESPONSE */} {value?.type_of_dref !== TYPE_IMMINENT && ( diff --git a/app/src/views/DrefApplicationForm/EventDetail/i18n.json b/app/src/views/DrefApplicationForm/EventDetail/i18n.json index 2422459184..2a6bd2801c 100644 --- a/app/src/views/DrefApplicationForm/EventDetail/i18n.json +++ b/app/src/views/DrefApplicationForm/EventDetail/i18n.json @@ -3,16 +3,20 @@ "strings": { "drefFormAffectedThePopulationTitle": "Did it affect the same population groups?", "drefFormAffectSameArea": "Has a similar event affected the same area(s) in the last 3 years?", + "drefFormApproximateDateOfImpact": "Approximate date of impact", "drefFormDescriptionEvent": "Description of the Event", "drefFormEventDate": "Date of the Event", "numericDetailsSectionTitle": "Numeric Details", "drefFormPeopleAffectedDescriptionSlowSudden": "People Affected include all those whose lives and livelihoods have been impacted as a direct result of the shock or stress.", "drefFormClickEmergencyResponseFramework": "Click to view Emergency Response Framework", + "drefFormEstimatedPeopleInNeed": "Estimated people in need (Optional)", "drefFormPeopleInNeed": "People in need (Optional)", "drefFormPeopleAffected": "Total affected population", "drefFormRiskPeopleLabel": "Total population at risk", + "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", "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.", "drefFormPeopleAffectedDescriptionImminent": "Includes all those whose lives and livelihoods are at risk as a direct result of the shock or stress.", + "drefFormImminentDisaster": "Provide any updates in the situation since the field report and explain what is expected to happen.", "drefFormLessonsLearnedDescription": "Specify how the lessons learnt from these previous operations are being used to mitigate similar challenges in the current operation", "drefFormLessonsLearnedTitle": "Lessons learned", "drefFormNsFundingDetail": "If yes, please specify which operations", @@ -24,20 +28,19 @@ "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?", "drefFormScopeAndScaleEvent": "Scope and scale of the event", "drefFormSlowEventDate": "Date when the trigger was met", + "drefFormTargetCommunities": "Explain why your National Society is acting now and what criteria is used to launch this operation.", + "drefFormTargetCommunitiesDescription": "If the operation uses triggers related to different phases (such as readiness activities and early actions) add your triggers and data sources", "drefFormUploadPhotos": "Upload photos (e.g. impact of the events, NS in the field, assessments)", "drefFormUploadPhotosLimitation": "Add maximum 2 photos", - "drefFormUploadSupportingDocument": "Upload any supporting document (Optional)", - "drefFormUploadSupportingDocumentButton": "Upload document", + "drefFormUploadSupportingDocument": "Upload any supporting documentation if relevant (Optional)", + "drefFormUploadSupportingDocumentButtonLabel": "Upload document", + "drefFormUploadSupportingDocumentDescription": "Here the National Society can upload documentation that substantiates their decision to launch this operation now. For example: seasonal outlooks, forecast information, reports from credible sources...etc.", "drefFormWhatWhereWhen": "What happened, where and when?", "drefOperationalLearningPlatformLabel": "To access the Operational Learning Dashboard and check learnings for the country, {clickHereLink}", "clickHereLinkLabel": "Click Here", "drefFormSelectImages": "Select images", "drefFormSourceInformationAddButton": "Add New Source Information", "drefFormSourceInformationTitle": "Source Information", - "drefFormSourceInformationDescription": "Add the links and the name of the sources, the name will be shown in the export, as an hyperlink.", - "drefHazardExpectedTitle": "When and where is the hazard expected to happen?", - "drefHazardExpectedDescription": "Narrative including Date and geographical areas.", - "drefHazardTitle": "Explain the underlying vulnerabilities and risks the hazard poses for at-risk communities?", - "drefHazardDescription": "Based on comparison of past events, what humanitarian impacts do you expect? Of what magnitude? (e.g. last time there was a cyclone making landfall with this windspeed, XX houses were destroyed, and we had to launch a DREF/emergency appeal for CHF xxx)." + "drefFormSourceInformationDescription": "Add the links and the name of the sources, the name will be shown in the export, as an hyperlink." } -} \ No newline at end of file +} diff --git a/app/src/views/DrefApplicationForm/EventDetail/index.tsx b/app/src/views/DrefApplicationForm/EventDetail/index.tsx index 0f2ed6c0a8..89fed32cb5 100644 --- a/app/src/views/DrefApplicationForm/EventDetail/index.tsx +++ b/app/src/views/DrefApplicationForm/EventDetail/index.tsx @@ -28,9 +28,9 @@ import NonFieldError from '#components/NonFieldError'; import { ONSET_SUDDEN, + TYPE_ASSESSMENT, TYPE_IMMINENT, TYPE_LOAN, - TYPE_RESPONSE, } from '../common'; import { type PartialDref } from '../schema'; @@ -133,7 +133,7 @@ function EventDetail(props: Props) { return (
- {value.type_of_dref === TYPE_RESPONSE && ( + {value.type_of_dref !== TYPE_ASSESSMENT && value.type_of_dref !== TYPE_LOAN && ( - {value.type_of_dref !== TYPE_IMMINENT && ( + {value.type_of_dref === TYPE_IMMINENT ? ( + +