-
Notifications
You must be signed in to change notification settings - Fork 1
Add new contingency list by filter #711
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: basseche <[email protected]>
Signed-off-by: basseche <[email protected]>
Signed-off-by: basseche <[email protected]>
@@ -42,7 +42,7 @@ export default function ContingencyListCreationForm() { | |||
const contingencyListTypeField = ( | |||
<RadioInput | |||
name={FieldConstants.CONTINGENCY_LIST_TYPE} | |||
options={Object.values(ContingencyListType)} | |||
options={[ContingencyListType.CRITERIA_BASED, ContingencyListType.EXPLICIT_NAMING]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est exactement la même chose non , pourquoi avoir changé ?
id?: UUID; | ||
} | ||
|
||
const schema: any = yup.object().shape({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Que fait le any ici ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si c'est parce que tu as un problème type script, vu qu'il suffit d'importer la bonne version de common ui pour régler le problème, tu peux l'enlever
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il y a une faute d'orthographe c'est form et pas from
|
||
const equipmentTypes: string[] = useMemo(() => { | ||
return [ | ||
EquipmentType.TWO_WINDINGS_TRANSFORMER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
À propos de EquipmentType
Deprecated:
move to a specialized subtype as this one is used everywhere and cause problems
const SEPARATOR_TYPE = 'SEPARATOR'; | ||
const attributes: IdentifiableAttributes[] = response.equipmentIds.map( | ||
(element: IdentifiableAttributes) => { | ||
const equipmentType: string = getBasicEquipmentLabel(element?.type) ?? null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quoi sert ?? null
a la fin ?
if (response.notFoundIds?.length > 0) { | ||
attributes.push({ id: SEPARATOR_TYPE, type: '' }); | ||
response.notFoundIds.forEach((element: IdentifiableAttributes) => { | ||
const equipmentType: string = getBasicEquipmentLabel(element?.type) ?? null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Même remarque qu'en haut
return map; | ||
}, []); | ||
|
||
const onStudyChanged = useCallback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call back qui déclenche un rendu supplémentaire inutile, autant intégrer directement le code dans le useEffect plus bas
needs changes from commons-ui to compile :
gridsuite/commons-ui#839