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>
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>
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>
- 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>
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>
Place "Ajouter" buttons after the items list instead of in the section
header, so they always appear below the last added element.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add centralized error translation layer (humanizeError) that converts
raw Symfony/Doctrine/API Platform messages into user-friendly French.
Fix useApi to extract errors from all backend response formats
(violations, error, message, hydra:description, detail).
Add toast deduplication to prevent double display. Replace error toast
icon (X → CircleX) to distinguish from the dismiss button.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Reorder: Composants, Pieces, Produits (was Pieces, Produits, Composants)
- Add icons to all nav links and dropdown groups
- Dashboard, Factory, ClipboardList, Cpu, Puzzle, Package, Link
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace Base64 data URIs with file-based storage served via dedicated endpoints
- Add DocumentPreviewModal navigation, DocumentThumbnail fileUrl support
- Refactor documents page with server-side pagination, search, sort and filters
- Update all components to use fileUrl/downloadUrl instead of raw path
- Add pagination composable support (total, page, itemsPerPage, attachmentFilter)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add CommentSection component for inline comments on entity detail pages
(machines, pieces, composants, products, categories, skeleton types).
Add dedicated /comments page with filters, pagination and clickable links.
Add unresolved count badge on avatar and in profile dropdown.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch ConstructeurSelect to client-side filtering instead of debounced
API calls. Add duplicate name check before creating a new constructeur
in both ConstructeurSelect and the constructeurs page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add usePermissions composable (isAdmin, canEdit, canView)
- Password-protected profile login with modal on profiles page
- Disable all form fields for ROLE_VIEWER across edit/create pages
- Show navigation buttons (Modifier/Consulter) for all roles, hide delete for viewers
- Add readonly prop to ModelTypeForm for category pages
- Disable modal fields (sites, constructeurs) for viewers
- Guard /admin routes in middleware
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a "Convertir" button on piece and component category lists that allows
converting an entire category (and all its items) between piece and component.
Includes a modal with eligibility checks and blocker display.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add useUrlState composable to sync page, search, sort and filter state
with URL query params. Back/forward navigation now restores the exact
list position. Replace hardcoded NuxtLink back buttons with
router.back() across all create/edit pages. Fix documents attachment
filter that checked non-existent ID fields instead of relation objects.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New /activity-log page showing all audit entries across pieces, products
and composants. Includes entity type and action filters, expandable
diffs, clickable entity links and pagination. Navbar link added under
Ressources liées.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add abort controllers and request deduplication to composables
- Add entity type cache invalidation on create/update/delete flows
- Add 179 new tests (utilities, services, composables, components)
- Fix Vue runtime warnings in structure editors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create useConfirm composable (promise-based, singleton state) and
ConfirmModal component. Replace all 10 confirm()/window.confirm() calls
across 9 pages and 1 composable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract 680-line navbar into LayoutAppNavbar component with useNavDropdown
composable. app.vue reduced from 698 to 22 LOC.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract 3 entity composables (useEntityCustomFields, useEntityDocuments,
useEntityProductDisplay) and entityCustomFieldLogic utility shared across
ComponentItem (1336→585 LOC) and PieceItem (1588→740 LOC).
Improve type safety in edit/create pages with explicit casts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract useMachineCreatePage composable and 5 preview/selector components
from machines/new.vue, reducing it from 1231 to 196 LOC.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>