Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dref Superticket Issues #342

Merged
merged 7 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions src/utils/domain/dref.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { components } from '#generated/types';

type PlannedIntervention = components<'read'>['schemas']['PlannedIntervention'];
type IdentifiedNeedsAndGaps = components<'read'>['schemas']['IdentifiedNeed'];
type NsActions = components<'read'>['schemas']['NationalSocietyAction'];

const plannedInterventionSortedList: Record<NonNullable<PlannedIntervention['title']>, number> = {
shelter_housing_and_settlements: 1,
livelihoods_and_basic_needs: 2,
multi_purpose_cash: 3,
health: 4,
water_sanitation_and_hygiene: 5,
protection_gender_and_inclusion: 6,
education: 7,
migration_and_displacement: 8,
risk_reduction_climate_adaptation_and_recovery: 9,
community_engagement_and_accountability: 10,
environmental_sustainability: 11,
coordination_and_partnerships: 12,
secretariat_services: 13,
national_society_strengthening: 14,
};

const identifiedNeedsAndGapsSortedList: Record<NonNullable<IdentifiedNeedsAndGaps['title']>, number> = {
shelter_housing_and_settlements: 1,
livelihoods_and_basic_needs: 2,
multi_purpose_cash_grants: 3,
health: 4,
water_sanitation_and_hygiene: 5,
protection_gender_and_inclusion: 6,
education: 7,
migration_and_displacement: 8,
risk_reduction_climate_adaptation_and_recovery: 9,
community_engagement_and_accountability: 10,
environment_sustainability: 11,
};

const nsActionsSortedList: Record<NsActions['title'], number> = {
shelter_housing_and_settlements: 1,
livelihoods_and_basic_needs: 2,
multi_purpose_cash: 3,
health: 4,
water_sanitation_and_hygiene: 5,
protection_gender_and_inclusion: 6,
education: 7,
migration_and_displacement: 8,
risk_reduction_climate_adaptation_and_recovery: 9,
community_engagement_and_accountability: 10,
environment_sustainability: 11,
coordination: 12,
national_society_readiness: 13,
assessment: 14,
resource_mobilization: 15,
activation_of_contingency_plans: 16,
national_society_eoc: 17,
other: 18,
};

export {
plannedInterventionSortedList,
identifiedNeedsAndGapsSortedList,
nsActionsSortedList,
};
5 changes: 4 additions & 1 deletion src/views/DrefApplicationExport/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"riskAndSecuritySectionHeading": "Risk and Security Considerations",
"riskSecurityHeading": "Please indicate about potential operation risk for this operations and mitigation actions",
"safetyConcernHeading": "Please indicate any security and safety concerns for this operation",
"hasChildRiskCompleted": "Has the child safeguarding risk analysis assessment been completed?",
"plannedInterventionSectionHeading": "Planned Intervention",
"targetedPersonsLabel": "Targeted Persons",
"budgetLabel": "Budget",
Expand Down Expand Up @@ -97,6 +98,8 @@
"drefAssessmentReportLink": "Assessment Report",
"SourceInformationSectionHeading": "Source Information",
"sourceInformationSourceNameTitle": "Source Name",
"sourceInformationSourceLinkTitle": "Source Link"
"sourceInformationSourceLinkTitle": "Source Link",
"crisisCategorySupportingDocumentLabel": "Crisis Category Supporting Document",
"targetingStrategySupportingDocument": "Targeting Strategy Supporting Document"
}
}
Loading