@@ -27,17 +27,17 @@ import {
2727 DREF_TYPE_IMMINENT ,
2828 DisasterCategory ,
2929} from '#utils/constants' ;
30- import { components } from '#generated/types' ;
30+ import {
31+ identifiedNeedsAndGapsSortedList ,
32+ nsActionsSortedList ,
33+ plannedInterventionSortedList ,
34+ } from '#utils/domain/dref' ;
3135
3236import ifrcLogo from '#assets/icons/ifrc-square.png' ;
3337
3438import i18n from './i18n.json' ;
3539import styles from './styles.module.css' ;
3640
37- type PlannedIntervention = components < 'read' > [ 'schemas' ] [ 'PlannedIntervention' ] ;
38- type IdentifiedNeedsAndGaps = components < 'read' > [ 'schemas' ] [ 'IdentifiedNeed' ] ;
39- type NsActions = components < 'read' > [ 'schemas' ] [ 'NationalSocietyAction' ] ;
40-
4141function BlockTextOutput ( props : TextOutputProps & { variant ?: never , withoutLabelColon ?: never } ) {
4242 return (
4343 < TextOutput
@@ -55,58 +55,6 @@ const colorMap: Record<DisasterCategory, string> = {
5555 [ DISASTER_CATEGORY_RED ] : styles . red ,
5656} ;
5757
58- const plannedInterventionSortedList : Record < NonNullable < PlannedIntervention [ 'title' ] > , number > = {
59- shelter_housing_and_settlements : 1 ,
60- livelihoods_and_basic_needs : 2 ,
61- multi_purpose_cash : 3 ,
62- health : 4 ,
63- water_sanitation_and_hygiene : 5 ,
64- protection_gender_and_inclusion : 6 ,
65- education : 7 ,
66- migration_and_displacement : 8 ,
67- risk_reduction_climate_adaptation_and_recovery : 9 ,
68- community_engagement_and_accountability : 10 ,
69- environmental_sustainability : 11 ,
70- coordination_and_partnerships : 12 ,
71- secretariat_services : 13 ,
72- national_society_strengthening : 14 ,
73- } ;
74-
75- const identifiedNeedsAndGapsSortedList : Record < NonNullable < IdentifiedNeedsAndGaps [ 'title' ] > , number > = {
76- shelter_housing_and_settlements : 1 ,
77- livelihoods_and_basic_needs : 2 ,
78- multi_purpose_cash_grants : 3 ,
79- health : 4 ,
80- water_sanitation_and_hygiene : 5 ,
81- protection_gender_and_inclusion : 6 ,
82- education : 7 ,
83- migration_and_displacement : 8 ,
84- risk_reduction_climate_adaptation_and_recovery : 9 ,
85- community_engagement_and_accountability : 10 ,
86- environment_sustainability : 11 ,
87- } ;
88-
89- const nsActionsSortedList : Record < NsActions [ 'title' ] , number > = {
90- shelter_housing_and_settlements : 1 ,
91- livelihoods_and_basic_needs : 2 ,
92- multi_purpose_cash : 3 ,
93- health : 4 ,
94- water_sanitation_and_hygiene : 5 ,
95- protection_gender_and_inclusion : 6 ,
96- education : 7 ,
97- migration_and_displacement : 8 ,
98- risk_reduction_climate_adaptation_and_recovery : 9 ,
99- community_engagement_and_accountability : 10 ,
100- environment_sustainability : 11 ,
101- coordination : 12 ,
102- national_society_readiness : 13 ,
103- assessment : 14 ,
104- resource_mobilization : 15 ,
105- activation_of_contingency_plans : 16 ,
106- national_society_eoc : 17 ,
107- other : 18 ,
108- } ;
109-
11058// eslint-disable-next-line import/prefer-default-export
11159export function Component ( ) {
11260 const { opsUpdateId } = useParams < { opsUpdateId : string } > ( ) ;
0 commit comments