diff --git a/package-lock.json b/package-lock.json index db8748f17..04a169b96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@gridsuite/commons-ui": "0.269.0", + "@gridsuite/commons-ui": "0.270.0", "@hello-pangea/dnd": "^18.0.1", "@hookform/resolvers": "^4.1.3", "@mui/icons-material": "^7.3.11", @@ -3322,9 +3322,9 @@ } }, "node_modules/@gridsuite/commons-ui": { - "version": "0.269.0", - "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.269.0.tgz", - "integrity": "sha512-q5u2WiKtmb1A7m91MUVUaQHAfuqYizNwUP6MZz0K+caKDAxorWcs4Tf/eQj6o/44KfPFEgy5k9EJ5xCP2Ej2kQ==", + "version": "0.270.0", + "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.270.0.tgz", + "integrity": "sha512-IdnvSuyT+l67501yEFF31eKBQMD6cnwIIyX9oaSERFxqsf2I73Vs1DAxhSm03axkzCFv8UpwPbK0dVYFuwk3AQ==", "license": "MPL-2.0", "dependencies": { "@ag-grid-community/locale": "^35.3.1", diff --git a/package.json b/package.json index 771f3946a..5eab86c48 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@gridsuite/commons-ui": "0.269.0", + "@gridsuite/commons-ui": "0.270.0", "@hello-pangea/dnd": "^18.0.1", "@hookform/resolvers": "^4.1.3", "@mui/icons-material": "^7.3.11", diff --git a/src/components/dialogs/network-modification/composite-modification/composite-modification-dialog.tsx b/src/components/dialogs/network-modification/composite-modification/composite-modification-dialog.tsx index 832eab553..8957cd355 100644 --- a/src/components/dialogs/network-modification/composite-modification/composite-modification-dialog.tsx +++ b/src/components/dialogs/network-modification/composite-modification/composite-modification-dialog.tsx @@ -110,6 +110,10 @@ import { createVoltageLevelTopologyDtoToForm, createVoltageLevelTopologyFormToDto, CreateVoltageLevelTopologyDto, + voltageLevelSectionCreationFormSchema, + voltageLevelSectionCreationDtoToForm, + voltageLevelSectionCreationFormToDto, + VoltageLevelSectionCreationForm, } from '@gridsuite/commons-ui'; import * as yup from 'yup'; import { yupResolver } from '@hookform/resolvers/yup'; @@ -471,6 +475,18 @@ export default function CompositeModificationDialog({ removeOptional: false, }, ], + [ + ModificationType.CREATE_VOLTAGE_LEVEL_SECTION, + { + formSchema: voltageLevelSectionCreationFormSchema, + dtoToForm: voltageLevelSectionCreationDtoToForm, + formToDto: (form) => voltageLevelSectionCreationFormToDto(form), + errorHeaderId: 'VoltageLevelSectionCreationError', + titleId: 'CreateVoltageLevelSection', + ModificationForm: VoltageLevelSectionCreationForm, + removeOptional: false, + }, + ], ]), [intl] );