- Piece interface: add referenceAuto field
- piece/[id].vue: read-only display with auto badge
- pieces/[id]/edit.vue: disabled input when referenceAuto is set
- pieces-catalog.vue: new column "Réf. auto"
- PieceItem.vue: badge + detail line for referenceAuto
- ModelTypeForm.vue: formula + required fields config for PIECE category
- modelTypes.ts: add referenceFormula/requiredFieldsForReference to types
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace auto-save-on-blur with single "Enregistrer" button
- Add Cancel button that resets local state
- Expose saveFieldDefinitions via defineExpose on MachineInfoCard
- Remove standalone save button from MachineCustomFieldDefEditor
- Add saveAllMachineCustomFields batch method
- Add submitEdition/cancelEdition/saving/canSubmit to orchestrator
- Show diff summary badges in version list entries
- Show link changes in restore modal description
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- useEntityVersions composable (list, preview, restore API calls)
- EntityVersionList component with auto-refresh after save
- VersionRestoreModal with context-aware messages per entity type
- Integrate into machine, composant, piece, product detail pages
- Add restore action label to historyDisplayUtils
- Show structure slots in composant/piece consultation mode
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shared module-level loading ref in useComposants caused structureDataLoading
to toggle during submission, unmounting the skeleton assignment UI. On remount,
watchers cleared selections not found in the limited local catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add read-only detail pages with edit/view toggle for piece, composant and
product, matching the existing machine detail pattern. Empty fields and
documents section are hidden in consultation mode. Catalogs and cross-links
updated to point to the new detail pages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Slot selections (piece, product, subcomponent, quantity) are no longer
saved immediately on change. Instead, edits are stored locally and
persisted together with base fields and custom fields when the user
clicks "Enregistrer les modifications".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SearchSelect was filtering results client-side on label only, hiding
server results matched by reference. Add serverSearch prop to bypass
client filter when the API already handles search.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>