Commit Graph

68 Commits

Author SHA1 Message Date
matthieu 9fc88df3ff fix(piece) : rendre les slots produit optionnels en création et édition
Auto Tag Develop / tag (push) Has been cancelled
Les sélections de produits liés ne bloquent plus la soumission du
formulaire de création ou d'édition de pièce. Les slots vides restent
visibles et peuvent être remplis ultérieurement.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:18:10 +02:00
matthieu d089cd4873 fix(model-type) : masquer uniquement les produits, garder les champs perso
Auto Tag Develop / tag (push) Has been cancelled
Ajoute une prop hideProducts au PieceModelStructureEditor pour masquer
la section « Produits inclus par défaut » sans retirer les champs
personnalisés. Utilisé pour les catégories PRODUCT.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:15:26 +02:00
matthieu 0fe7f3131e fix(model-type) : retirer l'éditeur de structure produit inutilisé
Auto Tag Develop / tag (push) Has been cancelled
Le PieceModelStructureEditor affiché pour les catégories PRODUCT ne
fonctionnait plus et n'est plus utilisé.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:12:29 +02:00
matthieu a6bbcaf6d1 fix(custom-fields) : masquer les champs machineContextOnly hors vue machine
Ajoute context: 'standalone' aux appels useCustomFieldInputs dans les
vues composant, pièce et produit (création et édition) pour filtrer
les champs perso réservés au contexte machine.

Exclut également ces champs de la formule de référence automatique
dans le ReferenceFormulaBuilder des catégories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:12:29 +02:00
matthieu 9f2e1da6ec fix(composant) : rendre les slots de structure optionnels à la création
Les emplacements pièces, produits et sous-composants du squelette ne
bloquent plus la soumission du formulaire de création de composant.
Les slots vides restent visibles en consultation avec l'indicateur rouge
« manquant » et peuvent être remplis ultérieurement en édition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:12:29 +02:00
matthieu 2c2de8bc00 test(machine-detail) : add hierarchy loading and override data integrity tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:52:42 +02:00
matthieu 150aceac24 test(piece-edit,documents) : add productIds sync, error paths, and document CRUD tests 2026-04-06 16:52:42 +02:00
matthieu 972f30e772 test(component-create) : add structure, error path, and null handling tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:52:42 +02:00
matthieu 8af68c9628 test(component-edit) : add document, error path, and null handling tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:52:42 +02:00
matthieu eb68336723 test(machine-custom-fields) : add checkbox and data integrity tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:52:42 +02:00
matthieu eeba229574 test(piece-edit) : add edit flow and product slot data integrity tests 2026-04-06 16:52:41 +02:00
matthieu 4454bbea3d test(component-edit) : add edit flow and slot data integrity tests 2026-04-06 16:52:41 +02:00
matthieu 1e40334e11 test(component-create) : add creation flow data integrity tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:52:41 +02:00
matthieu 83c75ecf69 test(crud) : add CRUD cache data integrity tests for products, composants, pieces
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:52:41 +02:00
matthieu b54739f6de test(custom-fields) : add data integrity tests for all field types 2026-04-06 16:52:41 +02:00
matthieu 82cbeb91a5 test(constructeur-links) : add sync algorithm data integrity tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:52:41 +02:00
matthieu e70c66e215 test(fixtures) : add shared mock data for data integrity tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:52:41 +02:00
matthieu 122170c3fd feat(ui) : add documentation page
Auto Tag Develop / tag (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:34:18 +02:00
matthieu 201485552a fix(ui) : remove legacy edit pages and history composables, unify create/edit forms
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>
2026-04-06 11:19:50 +02:00
matthieu 244bfdc3e4 fix : code review — correct 15 issues across UX overhaul (phases 1-4)
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>
2026-04-05 18:26:05 +02:00
matthieu 3a5860c83c fix(ui) : use correct component names without path prefix (EmptyState, UsedInSection) 2026-04-04 19:29:00 +02:00
matthieu ef4e208828 feat(ui) : enrich category related items modal with machine counts and navigation links 2026-04-04 17:31:34 +02:00
matthieu 14ed38704f feat(api) : add machine count to category related items endpoint 2026-04-04 17:29:39 +02:00
matthieu 8b02f821d3 feat(ui) : add UsedInSection showing reverse entity relationships on detail pages 2026-04-04 17:29:13 +02:00
matthieu 5b06e2ba51 feat(ui) : improve mobile responsiveness — breadcrumb truncation, tabs scroll, form grids 2026-04-04 17:25:36 +02:00
matthieu 7f91b30bf6 feat(ui) : error toasts persist until dismissed, add progress bar on auto-dismiss toasts 2026-04-04 17:25:00 +02:00
matthieu 8e0e3a3b33 fix(custom-fields) : fix resolvedStructure declaration order and remove duplicate in usePieceEdit 2026-04-04 17:20:14 +02:00
matthieu fea51fb66b fix(custom-fields) : fix declaration order of resolvedStructure in usePieceEdit 2026-04-04 17:18:52 +02:00
matthieu 644b05c30a fix(ui) : add lang=ts to script tags using TypeScript syntax
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>
2026-04-04 17:16:58 +02:00
matthieu 48beff753e feat(ui) : reorganize navbar by business domain — Catalogues + Administration 2026-04-04 17:14:02 +02:00
matthieu db6fd8f36a feat(ui) : add legacy URL redirects for old catalog and category routes 2026-04-04 17:13:23 +02:00
matthieu 6a43f08df8 fix(ui) : phase 1 review fixes — machine context links, type annotations, double arrow
- Add ?from=machine&machineId=xxx query params to entity NuxtLinks in hierarchy
- Add useRoute + machineId computed to ComponentItem, PieceItem, MachineProductsCard
- Add :string type to confirmRemove* handlers in machine page
- Remove unicode arrow from DetailHeader backLabel (icon already provides it)
- Add !isEditMode guard on product links in MachineProductsCard

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 17:12:20 +02:00
matthieu 8a355aad11 feat(ui) : create unified catalog+category pages under /catalogues/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 17:10:19 +02:00
matthieu 72c10ced40 feat(ui) : add contextual breadcrumb navigation 2026-04-04 17:08:17 +02:00
matthieu 71cf131e56 feat(ui) : add tabs to piece and product detail pages 2026-04-04 17:06:09 +02:00
matthieu 5b37404b9e feat(ui) : add tabs to product detail page 2026-04-04 17:05:30 +02:00
matthieu c6e1fce313 feat(ui) : add tabs to component detail page 2026-04-04 17:02:37 +02:00
matthieu 63104dc155 feat(ui) : add tabs to piece detail page 2026-04-04 17:02:31 +02:00
matthieu 2b96d20d56 feat(ui) : add tabs to machine page, compact header with site/reference badges 2026-04-04 17:00:02 +02:00
matthieu a8a3facec8 feat(ui) : create useUnsavedGuard composable for edit page navigation protection 2026-04-04 16:58:35 +02:00
matthieu 54b3b03611 feat(ui) : create EntityTabs shared component for tabbed detail pages 2026-04-04 16:56:45 +02:00
matthieu 6742da2fce feat(ui) : align entity detail pages — category links and version lists on all three 2026-04-04 16:42:53 +02:00
matthieu 1963ce261d feat(ui) : replace div-inputs with plain text in entity detail pages read mode 2026-04-04 16:42:23 +02:00
matthieu a610284325 feat(ui) : add confirmation dialogs on all delete and unlink actions 2026-04-04 16:41:35 +02:00
matthieu 239f417a35 feat(ui) : contextual back navigation in DetailHeader 2026-04-04 16:40:40 +02:00
matthieu 4f13f7d301 feat(ui) : clickable entity links, site→machines links, DataTable fixedLayout
- 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>
2026-04-04 16:39:21 +02:00
matthieu 6716d31126 feat(ui) : add item counters to machine section titles 2026-04-04 16:33:08 +02:00
matthieu 2b04860ea8 fix(custom-fields) : fix declaration order in useComponentEdit and useComponentCreate
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 13:18:16 +02:00
matthieu 894d522036 refactor(custom-fields) : unify 3 parallel implementations into 1 module
Replace ~2900 lines across 9 files with ~400 lines in 2 files:
- shared/utils/customFields.ts (types + pure helpers)
- composables/useCustomFieldInputs.ts (reactive composable)

Migrated all consumers:
- Backend: add defaultValue to API Platform serialization groups
- Standalone pages: component edit/create, piece edit/create, product edit/create/detail
- Machine page: MachineCustomFieldsCard, MachineInfoCard, useMachineDetailCustomFields
- Hierarchy: ComponentItem, PieceItem
- Shared: CustomFieldDisplay, CustomFieldInputGrid
- Category editor: componentStructure.ts

Deleted:
- entityCustomFieldLogic.ts (335 lines)
- customFieldUtils.ts (440 lines)
- customFieldFormUtils.ts (404 lines)
- useEntityCustomFields.ts (181 lines)
- customFieldFormUtils.test.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 13:09:27 +02:00
matthieu 0049638e3c fix(custom-fields) : context fields display, batch save, hierarchy propagation and UniqueEntity fix
- 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>
2026-04-03 13:46:39 +02:00