feat(ui) : refonte cartes dépliantes structure machine + DataTable parc machines + fix activity-log
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled

- Parc Machines transformé en DataTable avec filtres (site, date création, recherche)
- Vue d'ensemble : ajout filtre par plage de dates de création
- Activity-log : correction des liens entités (routes singulier sans /edit, ajout machine/document/model_type)
- ComponentItem & PieceItem : refonte complète des cartes dépliantes (design industriel raffiné)
  - Header compact avec tags colorés contrastés (référence, réf. auto, prix, produit, champs machine)
  - Panneau déplié structuré en sections avec mini-headers
  - Bordure gauche primary pour hiérarchie visuelle
- Ajout referenceAuto dans header et infos pour composants et pièces
- Suppression double encadrement ComponentHierarchy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 20:46:08 +02:00
parent 191e071957
commit 3cd18a721a
6 changed files with 797 additions and 599 deletions

View File

@@ -44,6 +44,7 @@
<option value="piece">Pièce</option>
<option value="product">Produit</option>
<option value="composant">Composant</option>
<option value="machine">Machine</option>
</select>
</div>
@@ -89,13 +90,16 @@
<template #cell-entity="{ row }">
<NuxtLink
v-if="row.action !== 'delete'"
v-if="row.action !== 'delete' && entityEditLink(row) !== '#'"
:to="entityEditLink(row)"
class="link link-hover link-primary"
>
{{ row.entityName || 'Sans nom' }}
</NuxtLink>
<span v-else class="text-base-content/50 line-through">
<span v-else-if="row.action === 'delete'" class="text-base-content/50 line-through">
{{ row.entityName || 'Sans nom' }}
</span>
<span v-else>
{{ row.entityName || 'Sans nom' }}
</span>
<span
@@ -195,19 +199,23 @@ const ENTITY_TYPE_LABELS: Record<string, string> = {
piece: 'Pièce',
product: 'Produit',
composant: 'Composant',
machine: 'Machine',
document: 'Document',
model_type: 'Modèle',
}
const entityTypeLabel = (type: string) => ENTITY_TYPE_LABELS[type] ?? type
const ENTITY_EDIT_ROUTES: Record<string, string> = {
piece: '/pieces',
const ENTITY_ROUTES: Record<string, string> = {
piece: '/piece',
product: '/product',
composant: '/component',
machine: '/machine',
}
const entityEditLink = (entry: ActivityLogEntry) => {
const base = ENTITY_EDIT_ROUTES[entry.entityType] ?? ''
return base ? `${base}/${entry.entityId}/edit` : '#'
const base = ENTITY_ROUTES[entry.entityType] ?? ''
return base ? `${base}/${entry.entityId}` : '#'
}
const actionBadgeClass = (action: string) => {