diff --git a/i18n/en.pot b/i18n/en.pot index 968c25777..cdb218502 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-10-15T11:17:07.503Z\n" -"PO-Revision-Date: 2024-10-15T11:17:07.503Z\n" +"POT-Creation-Date: 2024-10-16T11:01:15.583Z\n" +"PO-Revision-Date: 2024-10-16T11:01:15.584Z\n" msgid "schemas" msgstr "schemas" diff --git a/src/pages/organisationUnits/form/ImageField.tsx b/src/pages/organisationUnits/form/ImageField.tsx index 01415dd9e..26f47d9da 100644 --- a/src/pages/organisationUnits/form/ImageField.tsx +++ b/src/pages/organisationUnits/form/ImageField.tsx @@ -14,7 +14,8 @@ export function ImageField() { const dataEngine = useDataEngine() const fieldName = 'image' const { input } = useField(fieldName) - const currentFile: File | undefined = input.value || undefined + const currentFile: { name?: string; id?: string } | undefined = + input.value || undefined const uploadFile = async (fileToUpload: File) => { const ADD_NEW_FILE_RESOURCE_MUTATION = { @@ -93,7 +94,7 @@ export function ImageField() { /> - {currentFile && ( + {currentFile?.id && ( () @@ -13,7 +15,9 @@ export function OrganisationUnitSelector() { ? setSelectedOrgUnit(orgUnits[0].displayName) : setSelectedOrgUnit(undefined) - return ( + const userRootOrgUnits = useCurrentUserRootOrgUnits() + + return userRootOrgUnits.length > 0 ? ( <>
)} + ) : ( + + {i18n.t( + 'This is the first organisation unit and will be created as the root of the hierarchy.' + )} + ) }