diff --git a/src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-form.tsx b/src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-form.tsx index a5ff0c581e..045a49b36d 100644 --- a/src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-form.tsx +++ b/src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-form.tsx @@ -11,6 +11,7 @@ import { type FieldValues, useFormContext, type UseFieldArrayReturn, useWatch } import { AutocompleteInput, BooleanNullableCellRenderer, + CsvDownloadButton, type CsvProps, CsvPicker, CustomAgGridTable, @@ -277,20 +278,31 @@ export function LimitSetsTabularModificationForm({ dataFetching }: Readonly ({ fileName: 'limitset_modification_template', language, - getTemplateData, getTableData, }), - [language, getTemplateData, getTableData] + [language, getTableData] ); return ( {equipmentTypeField} - - + + + + + + + - + > label="UploadCSV" header={csvColumns.map((column) => column.id)} diff --git a/src/components/dialogs/network-modifications/tabular/tabular-form.tsx b/src/components/dialogs/network-modifications/tabular/tabular-form.tsx index 276952d74b..2d5d3276f5 100644 --- a/src/components/dialogs/network-modifications/tabular/tabular-form.tsx +++ b/src/components/dialogs/network-modifications/tabular/tabular-form.tsx @@ -10,6 +10,7 @@ import { FormattedMessage, useIntl } from 'react-intl'; import { type FieldValues, type UseFieldArrayReturn, useFormContext, useWatch } from 'react-hook-form'; import { AutocompleteInput, + CsvDownloadButton, type CsvProps, CsvPicker, CustomAgGridTable, @@ -328,20 +329,9 @@ export function TabularForm({ dataFetching, dialogMode }: Readonly prefilledModelDialogOpen.setTrue()} - disabled={!equipmentType} - > - - - ) : undefined, }), - [equipmentType, dialogMode, language, getTemplateData, getTableData, prefilledModelDialogOpen] + [equipmentType, dialogMode, language, getTableData] ); const { handleGeneratePrefilledModel } = usePrefilledModelGenerator({ @@ -544,18 +534,41 @@ export function TabularForm({ dataFetching, dialogMode }: Readonly {equipmentTypeField} - - + + + + + + + + {dialogMode === TabularModificationType.MODIFICATION && ( + + + + )} - + > label="UploadCSV" header={csvColumns}