The v-if on resolveDescription() was hiding the entire slot when
optionDescription prop was not provided. Now checks for slot presence
first, allowing custom formatDescription in PieceSelect/ProductSelect/
ComposantSelect to render properly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- PieceSelect, ProductSelect, ComposantSelect: show type name and
"Ref." prefix in dropdown descriptions (matching create page format)
- Category edit pages (component, piece, product): stay on page after
successful save instead of navigating back to list
- Component and product edit pages: same — stay on page after save
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Quantity is now managed per-component on the component edit page,
not at the category level.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 3 loadPieces/loadProducts/loadComposants(200) calls on mount were
redundant since select components now load filtered data server-side.
Removing them eliminates ~3 heavy API calls + constructeur resolution
per page load.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Quantity can now be edited directly on the component edit page next to
each piece selector, instead of only being defined in the category.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PieceSelect, ProductSelect and ComposantSelect were loading up to 200
items then filtering client-side by typeId. If the matching items were
not in the first 200, the dropdown appeared empty.
Now each select component uses API Platform filters (typePiece,
typeProduct, typeComposant) to fetch only relevant items server-side,
with local state to avoid overwriting the global catalog cache.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The save functions (savePieceSlotSelection, saveProductSlotSelection,
saveSubcomponentSlotSelection) were not checking result.success before
updating local state and showing success toast. Since useApi.patch()
never throws, the catch block was dead code and errors were silently
ignored while the UI showed success.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace read-only selections display with PieceSelect, ProductSelect, ComposantSelect
components that allow changing the assigned item in each slot directly from the edit page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Save composant piece slot quantity via PATCH on blur
- Pass slotId through hierarchy and selection entries
- Send prix as string (not number) to match backend expectation
- Show quantity in view mode when > 1
- Allow quantity edit for all pieces (not just root-level)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After JSON-to-tables migration, custom field definitions not linked to
a ModelType were invisible on edit pages because buildCustomFieldInputs
only mapped over structure definitions. Now also includes values whose
embedded customField definition has no matching structure entry.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- MachinePiecesCard : passer isEditMode au PieceItem + forward event update
- useMachineHierarchy : mapper quantity depuis le backend + construire
les pièces de structure du composant en lecture seule
- useMachineDetailUpdates : PATCH MachinePieceLink.quantity + fix reference null
- ComponentItem : séparer pièces liées / pièces incluses par défaut
- useEntityDocuments : skip chargement documents pour pièces de structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Site color field with color picker in create/edit modals
- Dark mode theme (mytheme-dark) with toggle in navbar
- Stronger site color visibility on cards (gradient, top border, badges)
- Bigger action buttons (btn-sm) on machine cards
- White card backgrounds with proper dark mode support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add site select field in MachineInfoCard (edit mode)
- Include siteId in machine PATCH payload
- Align action buttons (Modifier/Supprimer/Détails) consistently at card bottom
- Use mt-auto + flex-col to push buttons to bottom across all machine cards
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rework CSS theme (app.css), navbar layout, dashboard page, machine detail,
catalog pages, and various form/display components for better consistency
and mobile responsiveness.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
useToast.clearAll() now clears the dedup map to prevent test pollution,
and useEntityTypes error test expectation matches actual French message.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds UI to create, edit, reorder and delete custom field definitions
directly from the machine detail page in edit mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract duplicated resolveDeleteImpact/buildDeleteMessage into shared utility,
remove redundant computed wrappers, fix indentation, and remove dead code.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>