Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
modificationByFormulaDtoToForm,
modificationByFormulaFormToDto,
ModificationByFormulaForm,
TwoWindingsTransformerForm,

Check failure on line 100 in src/components/dialogs/network-modification/composite-modification/composite-modification-dialog.tsx

View workflow job for this annotation

GitHub Actions / build / build

Module '"@gridsuite/commons-ui"' has no exported member 'TwoWindingsTransformerForm'.
twoWindingsTransformerCreationFormSchema,

Check failure on line 101 in src/components/dialogs/network-modification/composite-modification/composite-modification-dialog.tsx

View workflow job for this annotation

GitHub Actions / build / build

Module '"@gridsuite/commons-ui"' has no exported member 'twoWindingsTransformerCreationFormSchema'.
twoWindingsTransformerCreationDtoToForm,

Check failure on line 102 in src/components/dialogs/network-modification/composite-modification/composite-modification-dialog.tsx

View workflow job for this annotation

GitHub Actions / build / build

Module '"@gridsuite/commons-ui"' has no exported member 'twoWindingsTransformerCreationDtoToForm'.
twoWindingsTransformerCreationFormToDto,

Check failure on line 103 in src/components/dialogs/network-modification/composite-modification/composite-modification-dialog.tsx

View workflow job for this annotation

GitHub Actions / build / build

Module '"@gridsuite/commons-ui"' has no exported member 'twoWindingsTransformerCreationFormToDto'.
staticVarCompensatorCreationFormSchema,
staticVarCompensatorDtoToForm,
staticVarCompensatorCreationFormToDto,
Expand Down Expand Up @@ -134,6 +138,7 @@
| 'ModificationForm'
| 'isModification'
| 'removeOptional'
| 'dialogWidth'
| 'getExtraFormProps'
>;

Expand Down Expand Up @@ -251,6 +256,20 @@
removeOptional: true,
},
],
[
ModificationType.TWO_WINDINGS_TRANSFORMER_CREATION,
{
formSchema: twoWindingsTransformerCreationFormSchema,
dtoToForm: twoWindingsTransformerCreationDtoToForm,
formToDto: twoWindingsTransformerCreationFormToDto,
errorHeaderId: 'TwoWindingsTransformerCreationError',
titleId: 'CreateTwoWindingsTransformer',
ModificationForm: TwoWindingsTransformerForm,
isModification: false,
removeOptional: false,
dialogWidth: 'xl', // for steps table
},
],
Comment thread
dbraquart marked this conversation as resolved.
[
ModificationType.LINE_CREATION,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import { FunctionComponent, useCallback, useEffect, useState } from 'react';
import { yupResolver } from '@hookform/resolvers/yup';
import { ObjectSchema } from 'yup';
import { Breakpoint } from '@mui/material';

export interface ModificationDialogProps<FormData extends FieldValues, ModificationData extends WithId> {
open: CustomMuiDialogProps['open'];
Expand All @@ -31,6 +32,7 @@
errorHeaderId: string;
isModification?: boolean;
removeOptional?: boolean;
dialogWidth?: Breakpoint;
getExtraFormProps?: (dto: ModificationData) => Record<string, unknown>;
}

Expand All @@ -48,6 +50,7 @@
dtoToForm,
formToDto,
errorHeaderId,
dialogWidth,
isModification = false,
removeOptional = true,
getExtraFormProps,
Expand Down Expand Up @@ -103,6 +106,7 @@
onSave={onSubmit}
titleId={titleId}
isDataFetching={!modificationData}
dialogWidth={dialogWidth}

Check failure on line 109 in src/components/dialogs/network-modification/simple-modification/ModificationDialog.tsx

View workflow job for this annotation

GitHub Actions / build / build

Type '{ children: Element; open: boolean; formContext: { validationSchema: ObjectSchema<FormData, AnyObject, any, "">; removeOptional: boolean; ... 17 more ...; subscribe: UseFormSubscribe<...>; }; ... 4 more ...; dialogWidth: Breakpoint | undefined; }' is not assignable to type 'IntrinsicAttributes & Readonly<CustomMuiDialogProps<FormData>>'.
>
<ModificationForm
isModification={isModification}
Expand Down
Loading