Skip to content

Conversation

basseche
Copy link
Contributor

@basseche basseche commented Aug 22, 2025

needs changes from commons-ui to compile :
gridsuite/commons-ui#839

@basseche basseche self-assigned this Aug 22, 2025
@basseche basseche closed this Sep 2, 2025
@basseche basseche reopened this Sep 2, 2025
@basseche basseche changed the title add new contingency list by filter WIP : add new contingency list by filter Sep 2, 2025
@basseche basseche changed the title WIP : add new contingency list by filter Add new contingency list by filter Sep 11, 2025
@@ -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]}
Copy link
Contributor

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({
Copy link
Contributor

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 ?

Copy link
Contributor

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

Copy link
Contributor

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,
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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(() => {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants