Skip to content

Commit 09168d1

Browse files
tnagorrafrozenhelium
authored andcommitted
Add fixes mentioned by marco
- Removed obsolete comments - Add descriptions for risk and mitigation section
1 parent 875c29f commit 09168d1

File tree

2 files changed

+19
-61
lines changed

2 files changed

+19
-61
lines changed

app/src/utils/importTemplate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
import { type CellRichTextValue } from 'exceljs';
1111

1212
import {
13-
parsePseudoHtml,
1413
type ParsePlugin,
14+
parsePseudoHtml,
1515
} from '#utils/richText';
1616

1717
type ValidationType = string | number | boolean | 'textArea';

app/src/views/AccountMyFormsDref/DownloadImportTemplateButton/DownloadImportTemplateModal/useImportTemplateSchema.ts

Lines changed: 18 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ function useImportTemplateSchema() {
136136
// OPERATION OVERVIEW
137137

138138
national_society: {
139-
// FIXME: We don't need this anymore?
140-
// headingBefore: 'Essential Information',
141139
type: 'select',
142140
label: 'National society',
143141
validation: 'number',
@@ -224,7 +222,6 @@ function useImportTemplateSchema() {
224222
label: 'Did it affect the same population groups?',
225223
optionsKey: '__boolean',
226224
validation: 'boolean',
227-
// FIXME: Cannot group the cells
228225
description: (
229226
'Indicate only if there was a similar event affecting the same area in the last 3 years.\n'
230227
+ 'Otherwise, leave the box empty.'
@@ -236,7 +233,6 @@ function useImportTemplateSchema() {
236233
label: 'Did the National Society respond?',
237234
optionsKey: '__boolean',
238235
validation: 'boolean',
239-
// FIXME: Cannot group the cells
240236
description: (
241237
'Indicate only if there was a similar event affecting the same area in the last 3 years.\n'
242238
+ 'Otherwise, leave the box empty.'
@@ -248,7 +244,6 @@ function useImportTemplateSchema() {
248244
label: 'Did the National Society request funding from DREF for that event(s)?',
249245
optionsKey: '__boolean',
250246
validation: 'boolean',
251-
// FIXME: Cannot group the cells
252247
description: (
253248
'Indicate only if there was a similar event affecting the same area in the last 3 years.\n'
254249
+ 'Otherwise, leave the box empty.'
@@ -259,14 +254,12 @@ function useImportTemplateSchema() {
259254
type: 'input',
260255
label: '<i>If yes, please specify which operations</i>',
261256
validation: 'string',
262-
// FIXME: Cannot group the cells
263257
description: (
264258
'Indicate only if there was a similar event affecting the same area in the last 3 years.\n'
265259
+ 'Otherwise, leave the box empty.'
266260
),
267261
},
268262

269-
// FIXME: remove this?
270263
dref_recurrent_text: {
271264
type: 'input',
272265
label: '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',
@@ -292,10 +285,8 @@ function useImportTemplateSchema() {
292285
event_date: {
293286
headingBefore: 'Description of the Event',
294287
type: 'input',
295-
// FIXME: Is this label change correct?
296-
label: 'Date of the Event',
288+
label: 'Date of the Event / Date when the trigger was met',
297289
validation: 'date',
298-
// FIXME: Not sure if this is correct
299290
description: 'DD/MM/YYY',
300291
},
301292

@@ -330,7 +321,6 @@ function useImportTemplateSchema() {
330321
),
331322
},
332323

333-
// FIXME: Added bold on "Comparative Analysis"
334324
event_scope: {
335325
type: 'input',
336326
validation: 'textArea',
@@ -359,9 +349,6 @@ function useImportTemplateSchema() {
359349
source_information: {
360350
type: 'list',
361351
label: 'Source Information',
362-
// FIXME: description has been removed
363-
// description: 'Add the links and the name of the sources, the
364-
// name will be shown in the export, as an hyperlink.',
365352
optionsKey: 'source_information',
366353
children: {
367354
type: 'object',
@@ -375,8 +362,6 @@ function useImportTemplateSchema() {
375362
type: 'input',
376363
validation: 'string',
377364
label: 'Link',
378-
// FIXME: Cannot group the cells
379-
// FIXME: This will be visible on all the repetitions
380365
description: 'Specify the names (up to 5) of the key information sources. If possible, provide links.\nThe names will be shown in the export as an hyperlink.',
381366
},
382367
},
@@ -398,24 +383,17 @@ function useImportTemplateSchema() {
398383
type: 'input',
399384
validation: 'date',
400385
label: 'If yes, start date of National Society actions',
401-
// FIXME: Not sure if this is correct
402386
description: 'DD/MM/YYY',
403387
},
404388

405389
national_society_actions: {
406390
type: 'list',
407391
label: 'National Society Actions',
408-
// FIXME: This has not been hidden in the UI, but to make this
392+
// NOTE: This has not been hidden in the shared template, but to make this
409393
// consistent we can hide this
410394
hiddenLabel: true,
411395
keyFieldName: 'title',
412396
optionsKey: 'national_society_actions',
413-
// FIXME: description has been removed
414-
// description: 'Please indicate a description of the ongoing
415-
// response with if possible: Branches involved, number of
416-
// volunteers/staff involved in actions, assets
417-
// deployed/distributed, number of people reach. Impact/added
418-
// value of the NS in the response already ongoing.',
419397
children: {
420398
type: 'object',
421399
fields: {
@@ -424,7 +402,6 @@ function useImportTemplateSchema() {
424402
validation: 'textArea',
425403
label: '<b>Description</b>',
426404
description: '<ins>national_society_actions.description</ins>',
427-
// FIXME: Does this need to be left aligned?
428405
},
429406
},
430407
},
@@ -449,7 +426,6 @@ function useImportTemplateSchema() {
449426
headingBefore: 'ICRC Actions Related To The Current Event',
450427
type: 'input',
451428
validation: 'textArea',
452-
// FIXME: Is this label change correct?
453429
label: 'Description',
454430
description: '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.',
455431
},
@@ -489,13 +465,6 @@ function useImportTemplateSchema() {
489465
),
490466
},
491467

492-
// FIXME: remove this?
493-
major_coordination_mechanism: {
494-
type: 'input',
495-
validation: 'string',
496-
label: '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…)?',
497-
},
498-
499468
needs_identified: {
500469
type: 'list',
501470
label: 'Needs (Gaps) Identified',
@@ -509,7 +478,6 @@ function useImportTemplateSchema() {
509478
validation: 'textArea',
510479
label: '<b>Description</b>',
511480
description: '<ins>needs_identified.description</ins>',
512-
// FIXME: Does this need to be left aligned?
513481
},
514482
},
515483
},
@@ -585,71 +553,62 @@ function useImportTemplateSchema() {
585553
validation: 'number',
586554
label: 'Targeted Population: <b>Women</b>',
587555
description: '<i>Number, e.g. XX,XXX.</i>',
588-
// FIXME: Does this need to be left aligned?
589556
},
590557

591558
men: {
592559
type: 'input',
593560
validation: 'number',
594561
label: 'Targeted Population: <b>Men</b>',
595562
description: '<i>Number, e.g. XX,XXX.</i>',
596-
// FIXME: Does this need to be left aligned?
597563
},
598564

599565
girls: {
600566
type: 'input',
601567
validation: 'number',
602568
label: 'Targeted Population: <b>Girls (under 18)</b>',
603569
description: '<i>Number, e.g. XX,XXX.</i>',
604-
// FIXME: Does this need to be left aligned?
605570
},
606571

607572
boys: {
608573
type: 'input',
609574
validation: 'number',
610575
label: 'Targeted Population: <b>Boys (under 18)</b>',
611576
description: '<i>Number, e.g. XX,XXX.</i>',
612-
// FIXME: Does this need to be left aligned?
613577
},
614578

615579
total_targeted_population: {
616580
type: 'input',
617581
validation: 'number',
618582
label: 'Targeted Population: <b>Total</b>',
619583
description: '<i>Number, e.g. XX,XXX.</i>',
620-
// FIXME: Does this need to be left aligned?
621584
},
622585

623586
disability_people_per: {
624587
type: 'input',
625588
validation: 'number',
626589
label: 'Estimated Percentage: <b>People with Disability</b>',
627590
description: '<i>Percentage, e.g. XX%.</i>',
628-
// FIXME: Does this need to be left aligned?
629591
},
630592

631593
people_per_urban: {
632594
type: 'input',
633595
validation: 'number',
634596
label: 'Estimated Percentage: <b>Urban</b>',
635597
description: '<i>Percentage, e.g. XX%.</i>',
636-
// FIXME: Does this need to be left aligned?
637598
},
638599

639600
people_per_local: {
640601
type: 'input',
641602
validation: 'number',
642603
label: 'Estimated Percentage: <b>Rural</b>',
643604
description: '<i>Percentage, e.g. XX%.</i>',
644-
// FIXME: Does this need to be left aligned?
645605
},
646606

647607
displaced_people: {
648608
type: 'input',
649609
validation: 'number',
650610
label: 'Estimated number of <b>People on the move</b> (if any)',
651611
description: '<i>Percentage, e.g. XX%.</i>',
652-
// FIXME: Does this need to be left aligned?
653612
},
654613

655614
risk_security: {
@@ -663,15 +622,24 @@ function useImportTemplateSchema() {
663622
type: 'input',
664623
validation: 'string',
665624
label: '<b>Risk</b>',
666-
// FIXME: Add dynamic description
667-
// FIXME: Does this need to be left aligned?
625+
description: (
626+
'<b>Identify up to 5 key potential risks or threats that could negatively impact the success of the operation.</b> These can range from environmental risks to social or logistical challenges.\n'
627+
+ '\n'
628+
+ '- What are the primary risks that could affect the operation’s implementation?\n'
629+
+ '- Are there any context-specific risks that need to be considered?\n'
630+
+ '- How might these risks impact the operation’s objectives, timeline, or resources?'
631+
),
668632
},
669633
mitigation: {
670634
type: 'input',
671635
validation: 'string',
672636
label: '<b>Mitigation action</b>',
673-
// FIXME: Add dynamic description
674-
// FIXME: Does this need to be left aligned?
637+
description: (
638+
'<b>Actions or strategies that will be implemented to reduce or manage the identified risks, ensuring the operation can proceed as planned.</b>\n'
639+
+ '\n'
640+
+ '- What specific measures or strategies will be put in place to mitigate the risks identified?\n'
641+
+ '- Will contingency plans or additional resources be required to address these risks?'
642+
),
675643
},
676644
},
677645
},
@@ -703,11 +671,11 @@ function useImportTemplateSchema() {
703671
type: 'input',
704672
validation: 'number',
705673
label: '<b>Requested Amount in CHF</b>',
706-
// FIXME: Does this need to be left aligned?
707674
},
708675

709676
planned_interventions: {
710677
type: 'list',
678+
// NOTE: This has been hidden in the shared template
711679
label: 'Add the interventions that apply',
712680
hiddenLabel: true,
713681
optionsKey: 'planned_interventions',
@@ -720,16 +688,12 @@ function useImportTemplateSchema() {
720688
validation: 'number',
721689
label: '<b>Budget</b>',
722690
description: 'Budget planned to be spent on the activities under this sector.',
723-
// FIXME: This will be visible on all repeated fields
724-
// FIXME: Does this need to be left aligned?
725691
},
726692
person_targeted: {
727693
type: 'input',
728694
validation: 'number',
729695
label: '<b>Person targeted</b>',
730696
description: 'Number of people planned to be reached through the activities under this sector.',
731-
// FIXME: This will be visible on all repeated fields
732-
// FIXME: Does this need to be left aligned?
733697
},
734698
description: {
735699
type: 'input',
@@ -747,13 +711,12 @@ function useImportTemplateSchema() {
747711
+ '<b>* Activity B</b>\n'
748712
+ '<b>* Activity B</b>\n'
749713
),
750-
// FIXME: Does this need to be left aligned?
751714
},
752715
indicators: {
753716
type: 'list',
754717
label: 'Indicators',
755-
// FIXME: This has not been hidden in the UI, but to make this
756-
// consistent we can hide this
718+
// NOTE: This has not been hidden in the shared
719+
// template, but to make this consistent we can hide this
757720
hiddenLabel: true,
758721
optionsKey: 'planned_interventions_indicators',
759722
children: {
@@ -763,7 +726,6 @@ function useImportTemplateSchema() {
763726
type: 'input',
764727
validation: 'string',
765728
label: 'Title',
766-
// FIXME: Does this need to be left aligned?
767729
description: (
768730
'Start by choosing indicators from the IFRC indicator databank whenever possible. This makes it easier to compare and analyse results across all emergency operations.\n'
769731
+ '\n'
@@ -773,15 +735,12 @@ function useImportTemplateSchema() {
773735
+ '\n'
774736
+ 'Consider the type of indicator unit. For example, it’s often simpler and clearer to track and report on the “number of people” rather than a “percentage of people.”'
775737
),
776-
// FIXME: This will be visible on all the repetitions
777738
},
778739
target: {
779740
type: 'input',
780741
validation: 'number',
781742
label: 'Target',
782-
// FIXME: Does this need to be left aligned?
783743
description: 'For each indicator, set a target. This helps track progress and measure whether the operation is achieving its key objectives, making it easier to report results later on.',
784-
// FIXME: This will be visible on all the repetitions
785744
},
786745
},
787746
},
@@ -874,7 +833,6 @@ function useImportTemplateSchema() {
874833
type: 'input',
875834
validation: 'date',
876835
label: 'Date of National Society Application',
877-
// FIXME: Not sure if this is correct
878836
description: 'DD/MM/YYY',
879837
},
880838

0 commit comments

Comments
 (0)