diff --git a/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/i18n.json b/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/i18n.json index 3d1e06042..065e54da5 100644 --- a/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/i18n.json +++ b/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/i18n.json @@ -5,7 +5,7 @@ "successMessage": "Local unit added successfully!", "revertChangesSuccessMessage": "Local unit reverted successfully!", "failedMessage": "Failed to add local unit", - "revertChangesFailedMessage": "Failed to revert changes in local unit", + "revertChangesFailedMessage": "Failed to revert changes in the local unit", "updateMessage": "Local unit updated successfully!", "updateFailedMessage": "Failed to update local unit", "specialitiesAndCapacityTitle": "Specialities & Capacity", diff --git a/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/index.tsx b/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/index.tsx index 83ac91f73..a23b924b3 100644 --- a/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/index.tsx +++ b/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/index.tsx @@ -427,7 +427,7 @@ function LocalUnitsForm(props: Props) { const readOnly = readOnlyFromProps || isNotDefined(localUnitDetailsResponse) - || localUnitDetailsResponse?.is_locked; + || localUnitDetailsResponse.is_locked; const { response: localUnitsOptions, @@ -640,9 +640,8 @@ function LocalUnitsForm(props: Props) { return (
- {!localUnitDetailsResponse?.is_locked - && readOnlyFromProps - && isNotDefined(localUnitDetailsResponse) + {isDefined(localUnitDetailsResponse) + && !readOnly && isDefined(actionsContainerRef.current) && ( {(environment !== 'production') && ( @@ -748,7 +747,7 @@ function LocalUnitsForm(props: Props) { readOnly={!pristine} /> )} - {localUnitDetailsResponse?.is_locked && ( + {localUnitDetailsResponse.is_locked && ( diff --git a/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsTable/index.tsx b/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsTable/index.tsx index faedefdb6..b4436fdb7 100644 --- a/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsTable/index.tsx +++ b/app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsTable/index.tsx @@ -130,6 +130,7 @@ function LocalUnitsTable(props: Props) { countryId: item.country, localUnitId: item.id, isValidated: item.validated, + isLocked: item.is_locked, localUnitName: getFirstTruthyString( item.local_branch_name, item.english_branch_name,