Skip to content

Commit 4a76404

Browse files
barshathakuriAdityaKhatri
authored andcommitted
Add two versions for final report
1 parent e32f5d2 commit 4a76404

File tree

56 files changed

+7384
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+7384
-46
lines changed

app/src/App/routes/index.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,37 @@ const drefFinalReportExport = customWrapRoute({
10181018
},
10191019
});
10201020

1021+
// TODO: Remove me after implementation of DrefFinalReport for imminent
1022+
const oldDrefFinalReportForm = customWrapRoute({
1023+
parent: rootLayout,
1024+
path: 'old-dref-final-reports/:finalReportId/edit',
1025+
component: {
1026+
render: () => import('#views/OldDrefFinalReportForm'),
1027+
props: {},
1028+
},
1029+
wrapperComponent: Auth,
1030+
context: {
1031+
title: 'Edit DREF Final Report Form',
1032+
visibility: 'is-authenticated',
1033+
permissions: ({ isGuestUser }) => !isGuestUser,
1034+
},
1035+
});
1036+
1037+
const oldDrefFinalReportExport = customWrapRoute({
1038+
path: 'old-dref-final-reports/:finalReportId/export',
1039+
component: {
1040+
render: () => import('#views/OldDrefFinalReportExport'),
1041+
props: {},
1042+
},
1043+
parent: rootLayout,
1044+
wrapperComponent: Auth,
1045+
context: {
1046+
title: 'DREF Final Report Export',
1047+
visibility: 'is-authenticated',
1048+
permissions: ({ isGuestUser }) => !isGuestUser,
1049+
},
1050+
});
1051+
10211052
const fieldReportFormNew = customWrapRoute({
10221053
parent: rootLayout,
10231054
path: 'field-reports/new',
@@ -1325,6 +1356,9 @@ const wrappedRoutes = {
13251356
...countryRoutes,
13261357
...surgeRoutes,
13271358

1359+
// TODO: Remove me after implementation of DrefFinalReport for imminent
1360+
oldDrefFinalReportForm,
1361+
oldDrefFinalReportExport,
13281362
// Redirects
13291363
preparednessOperationalLearning,
13301364
obsoleteFieldReportDetails,

app/src/views/AccountMyFormsDref/ActiveDrefTable/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,6 @@ function ActiveDrefTable(props: Props) {
242242

243243
const canCreateFinalReport = !has_final_report
244244
&& (applicationType === 'DREF' || applicationType === 'OPS_UPDATE')
245-
// TODO: Remove me after immplementation of DrefFinalReport for imminent
246-
&& ((isDefined(is_dref_imminent_v2) && has_ops_update)
247-
|| !is_dref_imminent_v2)
248245
&& (is_published ?? false)
249246
&& (item.type_of_dref !== DREF_TYPE_LOAN)
250247
&& (

app/src/views/AccountMyFormsDref/DrefTableActions/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ function DrefTableActions(props: Props) {
298298
body: (drefId: number) => ({ dref: drefId } as FinalReportRequestBody),
299299
onSuccess: (response) => {
300300
navigate(
301-
'drefFinalReportForm',
301+
isDrefImminentV2 ? 'drefFinalReportForm' : 'oldDrefFinalReportForm',
302302
{ params: { finalReportId: response.id } },
303303
);
304304
},
@@ -514,7 +514,7 @@ function DrefTableActions(props: Props) {
514514
)}
515515
{status === DREF_STATUS_IN_PROGRESS && applicationType === 'FINAL_REPORT' && (
516516
<Link
517-
to="drefFinalReportForm"
517+
to={isDrefImminentV2 ? 'drefFinalReportForm' : 'oldDrefFinalReportForm'}
518518
urlParams={{ finalReportId: id }}
519519
variant="secondary"
520520
icons={<PencilLineIcon className={styles.icon} />}

app/src/views/DrefFinalReportExport/i18n.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"hazardLabel": "Hazard",
1313
"typeOfDrefLabel": "Type of DREF",
1414
"crisisCategoryLabel": "Crisis Category",
15+
"publicationDate": "Publication Date",
1516
"eventOnsetLabel": "Event Onset",
1617
"drefAllocationLabel": "Total DREF Allocation",
1718
"chfPrefix": "CHF ",
@@ -91,6 +92,7 @@
9192
"achievementsHeading": "Narrative description of achievements",
9293
"lessonsLearntHeading": "Lessons Learnt",
9394
"challengesHeading": "Challenges",
95+
"financialReportVariancesModificationHeading": "Explain any variances or modifications to the implemented activities",
9496
"financialReportSectionHeading": "Financial Report",
9597
"financialReportVariancesHeading": "Please explain variances (if any)",
9698
"contactInformationSectionHeading": "Contact Information",
@@ -104,6 +106,16 @@
104106
"nationalSocietyHotlineHeading": "National Society Hotline",
105107
"sourceInformationSectionHeading": "Source Information",
106108
"sourceInformationSourceNameTitle": "Source Name",
107-
"sourceInformationSourceLinkTitle": "Source Link"
109+
"sourceInformationSourceLinkTitle": "Source Link",
110+
"implementation": "Implementation",
111+
"proposedActionsActivities": "Activities",
112+
"priorityActionsBudget": "Budget (CHF)",
113+
"priorityActionsSubTotal": "Sub-total",
114+
"priorityActionsSurgeDeployment": "Surge Deployment (if applicable)",
115+
"priorityActionsIndirectCost": "Indirect Cost",
116+
"priorityActionsTotal": "Total",
117+
"proposedActionsSector": "Sector",
118+
"mitigationEffortsAndAchievements": "Mitigation efforts and achievements.",
119+
"lessonsLearntAndChallenges": "Lessons learnt and challenges"
108120
}
109121
}

0 commit comments

Comments
 (0)