Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Enhance ImportApplicationsForm: support for XLS, XLSX, ODS file formats #2104

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
"duplicateTag": "A tag with this name already exists. Use a different name.",
"duplicateWave": "The migration wave could not be created due to a conflict with an existing wave. Make sure the name and start/end dates are unique and try again.",
"importErrorCheckDocumentation": "For status Error imports, check the documentation to ensure your file is structured correctly.",
"unsupportedFileType": "Unsupported file type. Only Excel, ODS, and CSV files are allowed.",
"insecureTracker": "Insecure mode deactivates certificate verification. Use insecure mode for instances that have self-signed certificates.",
"inheritedReviewTooltip": "This application is inheriting a review from an archetype.",
"inheritedReviewTooltip_plural": "This application is inheriting reviews from {{count}} archetypes.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ export const ImportApplicationsForm: React.FC<ImportApplicationsFormProps> = ({
}
}}
dropzoneProps={{
accept: { "text/csv": [".csv"] },
accept: {
"text/csv": [".csv"],
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
[".xlsx"],
"application/vnd.ms-excel": [".xls"],
"application/vnd.oasis.opendocument.spreadsheet": [".ods"],
},
onDropRejected: handleFileRejected,
}}
onClearClick={() => {
Expand All @@ -106,7 +112,7 @@ export const ImportApplicationsForm: React.FC<ImportApplicationsFormProps> = ({
<FormHelperText>
<HelperText>
<HelperTextItem variant="error">
You should select a CSV file.
{t("message.unsupportedFileType")}
</HelperTextItem>
</HelperText>
</FormHelperText>
Expand Down
Loading