Consolidate create and edit pages into single create pages with edit mode support.
Remove obsolete catalog pages, history composables, and fix remaining code review issues.
Include migration to relink orphaned custom fields.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Critical fixes:
- Make MigrateConstructeurLinks migration no-op (legacy tables already dropped)
- Add explicit ON CONFLICT (id) target in RestoreConstructeurLinks migration
- Replace N+1 queries with 4 bulk GROUP BY in ConstructeurStatsController
- Declare missing versionListRef template ref in machine detail page
- Add missing await on removeMachineDocument, cast activeTab as string
Important fixes:
- Add lang="ts" to ToastContainer and constructeurs page
- Type entityType as union in UsedInSection/useUsedIn
- Remove dead duration param from showError
- Update back-link props to new /catalogues/* URLs (3 pages)
- Replace raw error blocks with EmptyState in component/piece detail pages
- Type handleFillEntity params and machineInfoCardRef
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ComponentItem, PieceItem, and machine/[id] used 'as string' type
assertions but were missing lang="ts" on their script tags.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add NuxtLink on component/piece/product names in machine hierarchy
(using composantId, pieceId, product.id)
- Make site machine count badges clickable → /machines?sites={id}
- Add opt-in fixedLayout prop and minWidth to DataTable columns
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ComponentItem/PieceItem: DaisyUI divider, emit context-field-update for batch save
- CustomFieldDisplay: support editable/emit-blur/title/show-header props
- MachineComponentsCard/MachinePiecesCard: propagate custom-field-update events
- useMachineDetailCustomFields: pendingContextFieldUpdates + saveAllContextCustomFields
- useMachineDetailData: wire context field save into submitEdition
- useMachineDetailUpdates: only PATCH changed machine fields
- useMachineHierarchy: propagate contextCustomFields/Values from link to nodes
- componentStructure: include machineContextOnly in normalizeStructureForEditor
- Machine entity: convert empty reference to null, ignoreNull on UniqueEntity
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The sanitize layer was reconstructing the field object without machineContextOnly,
causing it to always be false in the save payload regardless of checkbox state.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- componentStructure: include machineContextOnly in save payload value object
- componentStructureHydrate: read machineContextOnly in hydrate and mapComponentCustomFields
- pieceProductStructure: include machineContextOnly in sanitize and hydrate
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Enable adding a component, piece, or product to a machine by selecting
only the category (ModelType) without a specific entity. The link
displays a red "À remplir" badge; clicking it reopens the modal
pre-filled with the category so the user can associate an item later.
Backend: entity FKs made nullable on the 3 link tables, modelType FK
added, controller/audit/version/MCP normalization adapted for null
entities.
Frontend: modal accepts category-only confirm, page handles fill mode,
hierarchy builder creates pending nodes, display components show
clickable badge with event propagation through the full hierarchy.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Empty component slots (pieces, products, subcomponents) now display
the category/type name with red styling instead of generic labels
- Machine view: empty structure pieces show type name + "manquant" in red
- Backend: include typePiece in structure slot data for name resolution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Backend: MaintenanceModeListener blocks non-admin API requests when
var/maintenance flag file exists. MaintenanceController provides
toggle (PUT /api/admin/maintenance) and public check endpoint
(GET /api/maintenance/check).
- Frontend: Toggle button in admin page, maintenance.vue page for
blocked users, middleware redirects non-admins to /maintenance.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merges the full git history of Inventory_frontend into the monorepo
under frontend/. Removes the submodule in favor of a unified repo.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>