Documents, products, components and pieces cards are now hidden when
empty in consultation mode. They remain visible in edit mode so users
can still add items. Addresses Geoffrey's feedback (INV-7).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitionSources passed to saveCustomFieldValues were pointing at
properties not serialized by the API (typeComposant.customFields,
typePiece.pieceCustomFields). Changed to structure.customFields which
is the correct serialized path, preventing orphan custom field creation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace site dropdown with inline checkboxes for multi-site filtering
- Sort machines alphabetically (localeCompare fr)
- Switch catalog search from ?name= to ?q= for OR search on name/reference
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevents data loss when saving ModelType: the frontend now sends existing
CustomField IDs so the backend can match them instead of deleting and recreating.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>