From 131ed90370b487d10849704401e82b6b20fb19be Mon Sep 17 00:00:00 2001 From: Shevijacobson Date: Sun, 22 Sep 2024 09:56:05 +0300 Subject: [PATCH] Extend file upload to support Excel and ODS Signed-off-by: Shevijacobson --- .../import-applications-form.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/app/pages/applications/components/import-applications-form/import-applications-form.tsx b/client/src/app/pages/applications/components/import-applications-form/import-applications-form.tsx index 274838de8a..db8fe43784 100644 --- a/client/src/app/pages/applications/components/import-applications-form/import-applications-form.tsx +++ b/client/src/app/pages/applications/components/import-applications-form/import-applications-form.tsx @@ -95,8 +95,13 @@ export const ImportApplicationsForm: React.FC = ({ } }} dropzoneProps={{ - accept: { "text/csv": [".csv"] }, - onDropRejected: handleFileRejected, + accept: { + "text/csv": [".csv"], + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": + [".xlsx"], + "application/vnd.ms-excel": [".xls"], + "application/vnd.oasis.opendocument.spreadsheet": [".ods"], + }, }} onClearClick={() => { setFile(undefined); @@ -106,7 +111,7 @@ export const ImportApplicationsForm: React.FC = ({ - You should select a CSV file. + {t("errors.invalidFileFormat")}