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>
Show cascade-delete impact (documents, machine links, custom fields)
in a confirmation modal instead of blocking deletion entirely.
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 description column to pieces and component catalog tables
- Show full text in a popover on hover for truncated descriptions
- Block skeleton editing when machines are linked (warning alert)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add description field (textarea) between name and reference/fournisseur
on create and edit pages for both pieces and components.
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>
- Load composants/pieces/products with itemsPerPage: 200 instead of 30
(root cause: only first 30 items were available in creation dropdowns)
- Rollback machine if skeleton PATCH fails (delete orphaned machine)
- Initialize custom fields after successful machine creation
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>
The path field contains base64 data URIs that can be several MB each.
Loading 200 documents at once exceeded the 128MB PHP memory limit.
Now the collection endpoint uses document:list group (without path)
and the frontend fetches the full document on demand when the user
clicks download or preview.
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>
- modelTypes.ts: use API Platform OrderFilter format (order[field]=dir) and proper page param
- product-catalog: load all products (itemsPerPage: 200) instead of default 30
- documents: load all documents (itemsPerPage: 200) instead of default 30
- useDocuments: support itemsPerPage option in loadDocuments/loadFromEndpoint
- pieces-catalog + component-catalog: add force:true to bypass stale cache on sort/filter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents memory exhaustion (OOM) on production server when loading
pieces, products, and composants in the component edit page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align with useProducts pattern: loaded flag, cache-first return,
loading guard, and clearCache helper to avoid redundant API calls.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Primary #304998 (bleu Malio), base #FBFAFA (gris), accent #ED8521
(orange), secondary #A5ACD0 (lavande). Focus ring updated to match.
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>
Type columns in piece, component and product catalogs now link
directly to the category edit page for quick access.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The init watcher destructured currentType/currentStructure before
setting selectedTypeId, so the values were stale (null). This caused
refreshCustomFieldInputs to receive null structure → empty definitions,
permanently wiping custom field display on piece and component edit pages.
Read selectedType.value / selectedTypeStructure.value after setting the
ID so the computed is already updated. Also remove the guard on the
piece selectedType watcher that prevented recovery.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove redundant getCustomFieldValuesByEntity() calls (use entity response)
- Remove redundant refreshDocuments() from onMounted (docs already in entity)
- Make loadHistory() non-blocking (fire-and-forget)
- Defer bulk catalog loads on component edit (pieces/products/composants)
- Use pieceTypes cache instead of separate getModelType() call on piece edit
- Try embedded typeProduct from entity response on product edit
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>