feat(piece) : add quantity display and input to composant edit page

This commit is contained in:
Matthieu
2026-03-12 14:40:55 +01:00
parent 721963449b
commit 9b40f9f2c7
2 changed files with 16 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ export type SelectionEntry = {
path: string
requirementLabel: string
resolvedName: string
quantity?: number
_definition?: Record<string, any>
}
export type StructureSelectionResult = {
@@ -59,6 +61,8 @@ export function collectStructureSelections(
path: isNonEmptyString(entry?.path) ? entry.path : `${nodePath}:piece-${index + 1}`,
requirementLabel: resolvers.resolvePieceLabel(definition),
resolvedName: catalogPiece?.name || selectedId,
quantity: typeof definition?.quantity === 'number' ? definition.quantity : undefined,
_definition: definition,
})
})