Skip to content

Commit 2091118

Browse files
committed
Add missing form fields in localUnitView component
1 parent 50e9d4c commit 2091118

File tree

2 files changed

+314
-2
lines changed
  • app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits

2 files changed

+314
-2
lines changed

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitView/index.tsx

Lines changed: 311 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,44 @@ function LocalUnitView(props: Props) {
499499
labelSelector={stringNameSelector}
500500
/>
501501
</DiffWrapper>
502+
<DiffWrapper
503+
showOnlyDiff
504+
value={newValue?.health?.other_facility_type}
505+
oldValue={oldValue?.health?.other_facility_type}
506+
enabled
507+
>
508+
<TextOutput
509+
strongLabel
510+
label={strings.localUnitViewOtherFacilityType}
511+
value={newValue?.health?.other_facility_type}
512+
/>
513+
</DiffWrapper>
514+
<DiffWrapper
515+
showOnlyDiff
516+
value={newValue?.health?.primary_health_care_center}
517+
oldValue={oldValue?.health?.primary_health_care_center}
518+
enabled
519+
>
520+
<SelectOutput
521+
label={strings.localUnitViewPrimaryHealthCareCenter}
522+
options={localUnitsOptions?.primary_health_care_center}
523+
value={newValue?.health?.primary_health_care_center}
524+
keySelector={numericIdSelector}
525+
labelSelector={stringNameSelector}
526+
/>
527+
</DiffWrapper>
528+
<DiffWrapper
529+
showOnlyDiff
530+
value={newValue?.health?.speciality}
531+
oldValue={oldValue?.health?.speciality}
532+
enabled
533+
>
534+
<TextOutput
535+
strongLabel
536+
label={strings.localUnitViewSpecialties}
537+
value={newValue?.health?.speciality}
538+
/>
539+
</DiffWrapper>
502540
<DiffWrapper
503541
showOnlyDiff
504542
value={newValue?.health?.general_medical_services}
@@ -513,6 +551,279 @@ function LocalUnitView(props: Props) {
513551
labelSelector={stringNameSelector}
514552
/>
515553
</DiffWrapper>
554+
<DiffWrapper
555+
showOnlyDiff
556+
value={newValue?.health?.specialized_medical_beyond_primary_level}
557+
oldValue={oldValue?.health?.specialized_medical_beyond_primary_level}
558+
enabled
559+
>
560+
<MultiSelectOutput
561+
label={strings.localUnitViewSpecializedMedicalService}
562+
options={localUnitsOptions?.specialized_medical_beyond_primary_level}
563+
value={newValue?.health?.specialized_medical_beyond_primary_level}
564+
keySelector={numericIdSelector}
565+
labelSelector={stringNameSelector}
566+
/>
567+
</DiffWrapper>
568+
<DiffWrapper
569+
showOnlyDiff
570+
value={newValue?.health?.other_services}
571+
oldValue={oldValue?.health?.other_services}
572+
enabled
573+
>
574+
<TextOutput
575+
strongLabel
576+
label={strings.localUnitViewOtherServices}
577+
value={newValue?.health?.other_services}
578+
/>
579+
</DiffWrapper>
580+
<DiffWrapper
581+
showOnlyDiff
582+
value={newValue?.health?.blood_services}
583+
oldValue={oldValue?.health?.blood_services}
584+
enabled
585+
>
586+
<MultiSelectOutput
587+
label={strings.localUnitViewBloodServices}
588+
options={localUnitsOptions?.blood_services}
589+
value={newValue?.health?.blood_services}
590+
keySelector={numericIdSelector}
591+
labelSelector={stringNameSelector}
592+
/>
593+
</DiffWrapper>
594+
<DiffWrapper
595+
showOnlyDiff
596+
value={newValue?.health?.professional_training_facilities}
597+
oldValue={oldValue?.health?.professional_training_facilities}
598+
enabled
599+
>
600+
<MultiSelectOutput
601+
label={strings.localUnitViewProfessionalTrainingFacilities}
602+
options={localUnitsOptions?.professional_training_facilities}
603+
value={newValue?.health?.professional_training_facilities}
604+
keySelector={numericIdSelector}
605+
labelSelector={stringNameSelector}
606+
/>
607+
</DiffWrapper>
608+
<DiffWrapper
609+
showOnlyDiff
610+
value={newValue?.health?.number_of_isolation_rooms}
611+
oldValue={oldValue?.health?.number_of_isolation_rooms}
612+
enabled
613+
>
614+
<TextOutput
615+
strongLabel
616+
label={strings.localUnitViewNumberOfIsolationRooms}
617+
value={newValue?.health?.number_of_isolation_rooms}
618+
/>
619+
</DiffWrapper>
620+
<DiffWrapper
621+
showOnlyDiff
622+
value={newValue?.health?.maximum_capacity}
623+
oldValue={oldValue?.health?.maximum_capacity}
624+
enabled
625+
>
626+
<TextOutput
627+
strongLabel
628+
label={strings.localUnitViewMaximumCapacity}
629+
value={newValue?.health?.maximum_capacity}
630+
/>
631+
</DiffWrapper>
632+
<DiffWrapper
633+
showOnlyDiff
634+
value={newValue?.health?.is_warehousing}
635+
oldValue={oldValue?.health?.is_warehousing}
636+
enabled
637+
>
638+
<TextOutput
639+
strongLabel
640+
valueType="boolean"
641+
label={strings.localUnitViewWarehousing}
642+
value={newValue?.health?.is_warehousing}
643+
/>
644+
</DiffWrapper>
645+
<DiffWrapper
646+
showOnlyDiff
647+
value={newValue?.health?.is_cold_chain}
648+
oldValue={oldValue?.health?.is_cold_chain}
649+
enabled
650+
>
651+
<TextOutput
652+
strongLabel
653+
valueType="boolean"
654+
label={strings.localUnitViewColdChain}
655+
value={newValue?.health?.is_cold_chain}
656+
/>
657+
</DiffWrapper>
658+
<DiffWrapper
659+
showOnlyDiff
660+
value={newValue?.health?.ambulance_type_a}
661+
oldValue={oldValue?.health?.ambulance_type_a}
662+
enabled
663+
>
664+
<TextOutput
665+
strongLabel
666+
label={strings.localUnitViewAmbulanceTypeA}
667+
value={newValue?.health?.ambulance_type_a}
668+
/>
669+
</DiffWrapper>
670+
<DiffWrapper
671+
showOnlyDiff
672+
value={newValue?.health?.ambulance_type_b}
673+
oldValue={oldValue?.health?.ambulance_type_b}
674+
enabled
675+
>
676+
<TextOutput
677+
strongLabel
678+
label={strings.localUnitViewAmbulanceTypeB}
679+
value={newValue?.health?.ambulance_type_b}
680+
/>
681+
</DiffWrapper>
682+
<DiffWrapper
683+
showOnlyDiff
684+
value={newValue?.health?.ambulance_type_c}
685+
oldValue={oldValue?.health?.ambulance_type_c}
686+
enabled
687+
>
688+
<TextOutput
689+
strongLabel
690+
label={strings.localUnitViewAmbulanceTypeC}
691+
value={newValue?.health?.ambulance_type_c}
692+
/>
693+
</DiffWrapper>
694+
<DiffWrapper
695+
showOnlyDiff
696+
value={newValue?.health?.total_number_of_human_resource}
697+
oldValue={oldValue?.health?.total_number_of_human_resource}
698+
enabled
699+
>
700+
<TextOutput
701+
strongLabel
702+
label={strings.localUnitViewTotalNumberOfHumanResources}
703+
value={newValue?.health?.total_number_of_human_resource}
704+
/>
705+
</DiffWrapper>
706+
<DiffWrapper
707+
showOnlyDiff
708+
value={newValue?.health?.general_practitioner}
709+
oldValue={oldValue?.health?.general_practitioner}
710+
enabled
711+
>
712+
<TextOutput
713+
strongLabel
714+
label={strings.localUnitViewGeneralPractitioner}
715+
value={newValue?.health?.general_practitioner}
716+
/>
717+
</DiffWrapper>
718+
<DiffWrapper
719+
showOnlyDiff
720+
value={newValue?.health?.specialist}
721+
oldValue={oldValue?.health?.specialist}
722+
enabled
723+
>
724+
<TextOutput
725+
strongLabel
726+
label={strings.localUnitViewSpecialist}
727+
value={newValue?.health?.specialist}
728+
/>
729+
</DiffWrapper>
730+
<DiffWrapper
731+
showOnlyDiff
732+
value={newValue?.health?.residents_doctor}
733+
oldValue={oldValue?.health?.residents_doctor}
734+
enabled
735+
>
736+
<TextOutput
737+
strongLabel
738+
label={strings.localUnitViewResidentsDoctor}
739+
value={newValue?.health?.residents_doctor}
740+
/>
741+
</DiffWrapper>
742+
<DiffWrapper
743+
showOnlyDiff
744+
value={newValue?.health?.nurse}
745+
oldValue={oldValue?.health?.nurse}
746+
enabled
747+
>
748+
<TextOutput
749+
strongLabel
750+
label={strings.localUnitViewNurse}
751+
value={newValue?.health?.nurse}
752+
/>
753+
</DiffWrapper>
754+
<DiffWrapper
755+
showOnlyDiff
756+
value={newValue?.health?.dentist}
757+
oldValue={oldValue?.health?.dentist}
758+
enabled
759+
>
760+
<TextOutput
761+
strongLabel
762+
label={strings.localUnitViewDentist}
763+
value={newValue?.health?.dentist}
764+
/>
765+
</DiffWrapper>
766+
<DiffWrapper
767+
showOnlyDiff
768+
value={newValue?.health?.nursing_aid}
769+
oldValue={oldValue?.health?.nursing_aid}
770+
enabled
771+
>
772+
<TextOutput
773+
strongLabel
774+
label={strings.localUnitViewNursingAid}
775+
value={newValue?.health?.nursing_aid}
776+
/>
777+
</DiffWrapper>
778+
<DiffWrapper
779+
showOnlyDiff
780+
value={newValue?.health?.midwife}
781+
oldValue={oldValue?.health?.midwife}
782+
enabled
783+
>
784+
<TextOutput
785+
strongLabel
786+
label={strings.localUnitViewMidwife}
787+
value={newValue?.health?.midwife}
788+
/>
789+
</DiffWrapper>
790+
<DiffWrapper
791+
showOnlyDiff
792+
value={newValue?.health?.other_profiles}
793+
oldValue={oldValue?.health?.other_profiles}
794+
enabled
795+
>
796+
<TextOutput
797+
strongLabel
798+
label={strings.localUnitViewOtherProfiles}
799+
value={newValue?.health?.other_profiles}
800+
/>
801+
</DiffWrapper>
802+
<DiffWrapper
803+
showOnlyDiff
804+
value={newValue?.health?.other_medical_heal}
805+
oldValue={oldValue?.health?.other_medical_heal}
806+
enabled
807+
>
808+
<TextOutput
809+
strongLabel
810+
valueType="boolean"
811+
label={strings.localUnitViewOtherMedicalHeal}
812+
value={newValue?.health?.other_medical_heal}
813+
/>
814+
</DiffWrapper>
815+
<DiffWrapper
816+
showOnlyDiff
817+
value={newValue?.health?.feedback}
818+
oldValue={oldValue?.health?.feedback}
819+
enabled
820+
>
821+
<TextOutput
822+
strongLabel
823+
label={strings.localUnitViewCommentsNS}
824+
value={newValue?.health?.feedback}
825+
/>
826+
</DiffWrapper>
516827
<DiffWrapper
517828
showOnlyDiff
518829
value={newValue?.health?.focal_point_position}

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,6 +1370,7 @@ function LocalUnitsForm(props: Props) {
13701370
?.health?.number_of_isolation_rooms
13711371
}
13721372
enabled={showChanges}
1373+
diffContainerClassName={styles.diffContainer}
13731374
>
13741375
<NumberInput
13751376
inputSectionClassName={styles.changes}
@@ -1649,8 +1650,8 @@ function LocalUnitsForm(props: Props) {
16491650
/>
16501651
</DiffWrapper>
16511652
<DiffWrapper
1652-
value={value.health?.nursing_aid}
1653-
oldValue={previousData?.health?.nursing_aid}
1653+
value={value.health?.midwife}
1654+
oldValue={previousData?.health?.midwife}
16541655
enabled={showChanges}
16551656
diffContainerClassName={styles.diffContainer}
16561657
>

0 commit comments

Comments
 (0)