Skip to content

Commit 274d310

Browse files
authored
Merge pull request #2069 from IFRCGo/feature/import-modal-updates
Update file names in local unit import modal
2 parents e7804e9 + e09e4b5 commit 274d310

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

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: [

0 commit comments

Comments
 (0)