Skip to content

Commit ccb8b20

Browse files
committed
fix(local-unit): udpate file name in import modal
1 parent 884553f commit ccb8b20

File tree

6 files changed

+130
-26
lines changed

6 files changed

+130
-26
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function ConfigureLocalUnitsModal(props: Props) {
9292
|| isNotDefined(manageLocalUnitsValues?.id)) {
9393
return true;
9494
}
95-
return false;
95+
return true;
9696
}, [manageLocalUnitsValues]);
9797

9898
const {

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitImportModal/i18n.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
"namespace": "localUnitImportModal",
33
"strings": {
44
"modalHeading": "Import Local Units for {countryName}",
5-
"modalDescription": "Please select a local unit type and upload the CSV file",
5+
"modalDescription": "Please select a local unit type and upload the xlsx file",
66
"modalImportPendingDescription": "Your file is currently being processed. You can close this modal and check the result from the upload history",
77
"closeButtonLabel": "Close",
88
"localUnitTypeInputLabel": "Local unit type",
9-
"uploadFileSectionTitle": "Upload CSV file",
10-
"uploadFileSectionDescription": "Please make sure to select a supported file format (csv) with size less than 10MB",
9+
"uploadFileSectionTitle": "Upload xlsx file",
10+
"uploadFileSectionDescription": "Please make sure to select a supported file format (xlsx) with size less than 10MB",
1111
"selectFileButtonLabel": "Select a file",
1212
"cancelUploadButtonLabel": "Cancel",
1313
"startUploadButtonLabel": "Upload",
14-
"contentStructureDescription": "The contents in the CSV should follow the structure provided in {templateLink}.",
14+
"contentStructureDescription": "The contents in the xlsx should follow the structure provided in {templateLink}.",
1515
"templateLinkLabel": "this template",
1616
"noPermissionBothDescription": "You don't have permission and this unit is not externally managed.",
1717
"noPermissionErrorDescription": "You do not have the permission to upload local unit data",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function LocalUnitBulkUploadModal(props: Props) {
258258
{isNotDefined(bulkUploadFile) && (
259259
<RawFileInput
260260
name="file"
261-
accept=".csv"
261+
accept=".xlsx"
262262
onChange={setBulkUploadFile}
263263
variant="secondary"
264264
disabled={

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

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -871,27 +871,27 @@ function LocalUnitsForm(props: Props) {
871871
error={error?.postcode}
872872
/>
873873
</DiffWrapper>
874+
<DiffWrapper
875+
showPreviousValue={showValueChanges}
876+
value={value.focal_person_loc}
877+
previousValue={previousData?.focal_person_loc}
878+
diffViewEnabled={diffViewEnabled}
879+
className={styles.diffContainer}
880+
>
881+
<TextInput
882+
inputSectionClassName={styles.inputSection}
883+
required
884+
label={strings.focalPersonLocal}
885+
name="focal_person_loc"
886+
value={value.focal_person_loc}
887+
onChange={setFieldValue}
888+
readOnly={readOnly}
889+
error={error?.focal_person_loc}
890+
/>
891+
</DiffWrapper>
874892
{value.type === TYPE_HEALTH_CARE && (
875893
hasUpdatePermission && (
876894
<>
877-
<DiffWrapper
878-
showPreviousValue={showValueChanges}
879-
value={value.focal_person_loc}
880-
previousValue={previousData?.focal_person_loc}
881-
diffViewEnabled={diffViewEnabled}
882-
className={styles.diffContainer}
883-
>
884-
<TextInput
885-
inputSectionClassName={styles.inputSection}
886-
required
887-
label={strings.focalPersonLocal}
888-
name="focal_person_loc"
889-
value={value.focal_person_loc}
890-
onChange={setFieldValue}
891-
readOnly={readOnly}
892-
error={error?.focal_person_loc}
893-
/>
894-
</DiffWrapper>
895895
<DiffWrapper
896896
showPreviousValue={showValueChanges}
897897
value={value.focal_person_en}
@@ -1773,7 +1773,6 @@ function LocalUnitsForm(props: Props) {
17731773
>
17741774
<NumberInput
17751775
inputSectionClassName={styles.inputSection}
1776-
required
17771776
label={strings.totalNumberOfHumanResources}
17781777
name="total_number_of_human_resource"
17791778
value={value.health?.total_number_of_human_resource}

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ const schema: LocalUnitsFormSchema = {
214214
validations: [
215215
positiveIntegerCondition,
216216
],
217-
required: true,
218217
},
219218
general_practitioner: {
220219
validations: [
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"parent": "000053-1761568674475.json",
3+
"actions": [
4+
{
5+
"action": "add",
6+
"key": "addOtherProfilesButtonLabel",
7+
"namespace": "countryNsOverviewContextAndStructure",
8+
"value": "Add Other Profiles"
9+
},
10+
{
11+
"action": "add",
12+
"key": "localUnitViewPharmacists",
13+
"namespace": "countryNsOverviewContextAndStructure",
14+
"value": "Pharmacists"
15+
},
16+
{
17+
"action": "add",
18+
"key": "localUnitViewRemovedOtherProfiles",
19+
"namespace": "countryNsOverviewContextAndStructure",
20+
"value": "Removed Other profiles"
21+
},
22+
{
23+
"action": "add",
24+
"key": "otherProfileNumberOutputLabel",
25+
"namespace": "countryNsOverviewContextAndStructure",
26+
"value": "Number"
27+
},
28+
{
29+
"action": "add",
30+
"key": "otherProfileOutputLabel",
31+
"namespace": "countryNsOverviewContextAndStructure",
32+
"value": "Other Profiles"
33+
},
34+
{
35+
"action": "add",
36+
"key": "otherProfilePositionOutputLabel",
37+
"namespace": "countryNsOverviewContextAndStructure",
38+
"value": "Position"
39+
},
40+
{
41+
"action": "add",
42+
"key": "otherProfilesNumberLabel",
43+
"namespace": "countryNsOverviewContextAndStructure",
44+
"value": "Number"
45+
},
46+
{
47+
"action": "add",
48+
"key": "otherProfilesPositionLabel",
49+
"namespace": "countryNsOverviewContextAndStructure",
50+
"value": "Position"
51+
},
52+
{
53+
"action": "add",
54+
"key": "otherProfilesRemoveLabel",
55+
"namespace": "countryNsOverviewContextAndStructure",
56+
"value": "Remove"
57+
},
58+
{
59+
"action": "add",
60+
"key": "otherTrainingFacilities",
61+
"namespace": "countryNsOverviewContextAndStructure",
62+
"value": "Other training facilities"
63+
},
64+
{
65+
"action": "add",
66+
"key": "pharmacists",
67+
"namespace": "countryNsOverviewContextAndStructure",
68+
"value": "Pharmacists"
69+
},
70+
{
71+
"action": "add",
72+
"key": "qualifiersTitle",
73+
"namespace": "countryNsOverviewContextAndStructure",
74+
"value": "Qualifiers"
75+
},
76+
{
77+
"action": "remove",
78+
"key": "otherProfiles",
79+
"namespace": "countryNsOverviewContextAndStructure"
80+
},
81+
{
82+
"action": "update",
83+
"key": "contentStructureDescription",
84+
"namespace": "localUnitImportModal",
85+
"newValue": "The contents in the xlsx should follow the structure provided in {templateLink}."
86+
},
87+
{
88+
"action": "update",
89+
"key": "modalDescription",
90+
"namespace": "localUnitImportModal",
91+
"newValue": "Please select a local unit type and upload the xlsx file"
92+
},
93+
{
94+
"action": "update",
95+
"key": "uploadFileSectionDescription",
96+
"namespace": "localUnitImportModal",
97+
"newValue": "Please make sure to select a supported file format (xlsx) with size less than 10MB"
98+
},
99+
{
100+
"action": "update",
101+
"key": "uploadFileSectionTitle",
102+
"namespace": "localUnitImportModal",
103+
"newValue": "Upload xlsx file"
104+
}
105+
]
106+
}

0 commit comments

Comments
 (0)