@@ -17,13 +17,14 @@ import {
1717 listToMap ,
1818} from '@togglecorp/fujs' ;
1919
20- import Link from '#components/Link' ;
20+ import Link from '#components/printable/ Link' ;
2121import PrintableContainer from '#components/printable/PrintableContainer' ;
2222import PrintableDataDisplay from '#components/printable/PrintableDataDisplay' ;
2323import PrintableDescription from '#components/printable/PrintableDescription' ;
2424import PrintablePage from '#components/printable/PrintablePage' ;
2525import useGlobalEnums from '#hooks/domain/useGlobalEnums' ;
2626import { useRequest } from '#utils/restRequest' ;
27+ import PrintableContactOutput from '#views/EapFullExport/PrintableContactOutput' ;
2728
2829import i18n from './i18n.json' ;
2930import styles from './styles.module.css' ;
@@ -73,48 +74,8 @@ export function Component() {
7374 const {
7475 cover_image_file,
7576
76- national_society_contact_name,
77- national_society_contact_email,
78- national_society_contact_title,
79- national_society_contact_phone_number,
80-
8177 partner_contacts,
8278
83- ifrc_delegation_focal_point_name,
84- ifrc_delegation_focal_point_email,
85- ifrc_delegation_focal_point_title,
86- ifrc_delegation_focal_point_phone_number,
87-
88- ifrc_head_of_delegation_name,
89- ifrc_head_of_delegation_email,
90- ifrc_head_of_delegation_title,
91- ifrc_head_of_delegation_phone_number,
92-
93- dref_focal_point_name,
94- dref_focal_point_email,
95- dref_focal_point_title,
96- dref_focal_point_phone_number,
97-
98- ifrc_regional_focal_point_name,
99- ifrc_regional_focal_point_email,
100- ifrc_regional_focal_point_title,
101- ifrc_regional_focal_point_phone_number,
102-
103- ifrc_regional_ops_manager_name,
104- ifrc_regional_ops_manager_email,
105- ifrc_regional_ops_manager_title,
106- ifrc_regional_ops_manager_phone_number,
107-
108- ifrc_regional_head_dcc_name,
109- ifrc_regional_head_dcc_email,
110- ifrc_regional_head_dcc_title,
111- ifrc_regional_head_dcc_phone_number,
112-
113- ifrc_global_ops_coordinator_name,
114- ifrc_global_ops_coordinator_email,
115- ifrc_global_ops_coordinator_title,
116- ifrc_global_ops_coordinator_phone_number,
117-
11879 admin2_details,
11980 lead_time,
12081 planned_operations,
@@ -482,16 +443,8 @@ export function Component() {
482443 </ PrintableContainer >
483444 ) ) }
484445 </ PrintableContainer >
485- < PrintableContainer
486- heading = { strings . operationBudgetLabel }
487- headingLevel = { 3 }
488- >
489- < Link
490- href = { budget_file_details ?. file }
491- withLinkIcon
492- external
493- withUnderline
494- >
446+ < PrintableContainer headingLevel = { 3 } >
447+ < Link href = { budget_file_details ?. file } >
495448 { strings . downloadBudgetLabel }
496449 </ Link >
497450 </ PrintableContainer >
@@ -503,24 +456,16 @@ export function Component() {
503456 < PrintableDescription value = { strings . contactInformationDescription } />
504457 </ PrintableContainer >
505458 < PrintableContainer heading = { strings . nationalLabel } headingLevel = { 4 } >
506- < PrintableDataDisplay
459+ < PrintableContactOutput
507460 label = { strings . nationalSocietyContactLabel }
508- valueType = "text"
509- value = { [
510- national_society_contact_name ,
511- national_society_contact_title ,
512- national_society_contact_email ,
513- national_society_contact_phone_number ,
514- ]
515- . filter ( isTruthyString )
516- . join ( ', ' ) }
517- variant = "inline"
518- strongLabel
461+ namePrefix = "national_society_contact"
462+ data = { fullEapResponse }
463+ prevData = { undefined }
519464 withDiff = { false }
520465 />
521466 < PrintableContainer
522467 heading = { strings . partnerNationalSocietyContactLabel }
523- headingLevel = { 5 }
468+ headingLevel = { 6 }
524469 >
525470 { partner_contacts ?. map ( ( partner ) => (
526471 < PrintableDataDisplay
@@ -541,115 +486,59 @@ export function Component() {
541486 </ PrintableContainer >
542487 </ PrintableContainer >
543488 < PrintableContainer heading = { strings . delegationLabel } headingLevel = { 4 } >
544- < PrintableDataDisplay
489+ < PrintableContactOutput
545490 label = { strings . delegationFocalLabel }
546- valueType = "text"
491+ namePrefix = "ifrc_delegation_focal_point"
492+ data = { fullEapResponse }
493+ prevData = { undefined }
547494 withDiff = { false }
548- value = { [
549- ifrc_delegation_focal_point_name ,
550- ifrc_delegation_focal_point_email ,
551- ifrc_delegation_focal_point_title ,
552- ifrc_delegation_focal_point_phone_number ,
553- ]
554- . filter ( isTruthyString )
555- . join ( ', ' ) }
556- variant = "inline"
557- strongLabel
558495 />
559- < PrintableDataDisplay
496+ < PrintableContactOutput
560497 label = { strings . delegationHeadLabel }
561- valueType = "text"
498+ namePrefix = "ifrc_head_of_delegation"
499+ data = { fullEapResponse }
500+ prevData = { undefined }
562501 withDiff = { false }
563- value = { [
564- ifrc_head_of_delegation_name ,
565- ifrc_head_of_delegation_title ,
566- ifrc_head_of_delegation_email ,
567- ifrc_head_of_delegation_phone_number ,
568- ]
569- . filter ( isTruthyString )
570- . join ( ', ' ) }
571- variant = "inline"
572- strongLabel
573502 />
574503 </ PrintableContainer >
575504 < PrintableContainer
576505 heading = { strings . regionalGlobalLabel }
577506 headingLevel = { 4 }
578507 >
579- < PrintableDataDisplay
508+ < PrintableContactOutput
580509 label = { strings . drefFocalLabel }
581- valueType = "text"
510+ namePrefix = "dref_focal_point"
511+ data = { fullEapResponse }
512+ prevData = { undefined }
582513 withDiff = { false }
583- value = { [
584- dref_focal_point_name ,
585- dref_focal_point_email ,
586- dref_focal_point_title ,
587- dref_focal_point_phone_number ,
588- ]
589- . filter ( isTruthyString )
590- . join ( ', ' ) }
591- variant = "inline"
592- strongLabel
593514 />
594- < PrintableDataDisplay
515+ < PrintableContactOutput
595516 label = { strings . regionalFocalLabel }
596- valueType = "text"
517+ namePrefix = "ifrc_regional_focal_point"
518+ data = { fullEapResponse }
519+ prevData = { undefined }
597520 withDiff = { false }
598- value = { [
599- ifrc_regional_focal_point_name ,
600- ifrc_regional_focal_point_email ,
601- ifrc_regional_focal_point_title ,
602- ifrc_regional_focal_point_phone_number ,
603- ]
604- . filter ( isTruthyString )
605- . join ( ', ' ) }
606- variant = "inline"
607- strongLabel
608521 />
609- < PrintableDataDisplay
522+ < PrintableContactOutput
610523 label = { strings . regionalOpsLabel }
611- valueType = "text"
524+ namePrefix = "ifrc_regional_ops_manager"
525+ data = { fullEapResponse }
526+ prevData = { undefined }
612527 withDiff = { false }
613- value = { [
614- ifrc_regional_ops_manager_name ,
615- ifrc_regional_ops_manager_email ,
616- ifrc_regional_ops_manager_title ,
617- ifrc_regional_ops_manager_phone_number ,
618- ]
619- . filter ( isTruthyString )
620- . join ( ', ' ) }
621- variant = "inline"
622- strongLabel
623528 />
624- < PrintableDataDisplay
529+ < PrintableContactOutput
625530 label = { strings . regionalHeadLabel }
626- valueType = "text"
531+ namePrefix = "ifrc_regional_head_dcc"
532+ data = { fullEapResponse }
533+ prevData = { undefined }
627534 withDiff = { false }
628- value = { [
629- ifrc_regional_head_dcc_name ,
630- ifrc_regional_head_dcc_email ,
631- ifrc_regional_head_dcc_title ,
632- ifrc_regional_head_dcc_phone_number ,
633- ]
634- . filter ( isTruthyString )
635- . join ( ', ' ) }
636- variant = "inline"
637- strongLabel
638535 />
639- < PrintableDataDisplay
536+ < PrintableContactOutput
640537 label = { strings . globalOpsLabel }
641- valueType = "text"
538+ namePrefix = "ifrc_global_ops_coordinator"
539+ data = { fullEapResponse }
540+ prevData = { undefined }
642541 withDiff = { false }
643- value = { [
644- ifrc_global_ops_coordinator_name ,
645- ifrc_global_ops_coordinator_email ,
646- ifrc_global_ops_coordinator_title ,
647- ifrc_global_ops_coordinator_phone_number ,
648- ]
649- . filter ( isTruthyString )
650- . join ( ', ' ) }
651- variant = "inline"
652- strongLabel
653542 />
654543 </ PrintableContainer >
655544 </ PrintableContainer >
0 commit comments