feat: add product catalogue and product-aware UI
- introduce product catalogue pages, management view entries and shared product composables\n- wire product selection into component/piece flows and machine skeleton requirements\n- display linked product metadata and documents across machine, component and piece views\n- generalize model type tooling to handle PRODUCT category
This commit is contained in:
@@ -93,6 +93,7 @@
|
||||
<th class="w-24">Aperçu</th>
|
||||
<th>Nom</th>
|
||||
<th>Référence</th>
|
||||
<th>Type de pièce</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -106,6 +107,7 @@
|
||||
</td>
|
||||
<td>{{ piece.name || 'Pièce sans nom' }}</td>
|
||||
<td>{{ piece.reference || '—' }}</td>
|
||||
<td>{{ resolvePieceType(piece) }}</td>
|
||||
<td>
|
||||
<div class="flex items-center gap-2">
|
||||
<NuxtLink
|
||||
@@ -180,6 +182,17 @@ const resolvePreviewAlt = (piece: Record<string, any>) => {
|
||||
return 'Aperçu du document'
|
||||
}
|
||||
|
||||
const resolvePieceType = (piece: Record<string, any>) => {
|
||||
const type = piece?.typePiece
|
||||
if (type?.name) {
|
||||
return type.name
|
||||
}
|
||||
if (piece?.typePieceLabel) {
|
||||
return piece.typePieceLabel
|
||||
}
|
||||
return '—'
|
||||
}
|
||||
|
||||
const resolveDeleteGuard = (piece: Record<string, any>) => {
|
||||
const blockingReasons: string[] = []
|
||||
const machineLinks = Array.isArray(piece?.machineLinks)
|
||||
|
||||
Reference in New Issue
Block a user