2 Commits

Author SHA1 Message Date
Matthieu
ac860d3165 fix(constructeurs) : always send constructeurs array in PATCH payload 2026-03-23 13:52:39 +01:00
Matthieu
8176635eb8 fix(machine) : use linkId instead of composantId when deleting a component from machine
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:35:43 +01:00
2 changed files with 2 additions and 3 deletions

View File

@@ -273,6 +273,7 @@ export const buildMachineHierarchyFromLinks = (
originalComposant: originalComponent,
machineComponentLink: link,
machineComponentLinkId,
linkId: machineComponentLinkId,
componentLinkId: machineComponentLinkId,
parentComponentLinkId: resolveIdentifier(link.parentComponentLinkId, link.parentLinkId, link.parentMachineComponentLinkId, appliedComponent.parentComponentLinkId),
parentComposantId: resolveIdentifier(appliedComponent.parentComposantId, link.parentComponentId),

View File

@@ -155,9 +155,7 @@ export const buildConstructeurRequestPayload = <T extends Record<string, any>>(
delete next.constructeurs;
delete next.constructeurIds;
if (ids.length) {
next.constructeurs = ids.map((id) => `/api/constructeurs/${id}`);
}
next.constructeurs = ids.map((id) => `/api/constructeurs/${id}`);
return next as T & { constructeurs?: string[] };
};