feat: retire la colonne catégorie des catalogues

This commit is contained in:
Matthieu
2025-10-31 10:04:40 +01:00
parent dc2bc6c70a
commit 3af6c50892
3 changed files with 4 additions and 14 deletions

View File

@@ -33,7 +33,6 @@
<thead> <thead>
<tr class="text-base-content/70"> <tr class="text-base-content/70">
<th scope="col">Nom</th> <th scope="col">Nom</th>
<th scope="col">Catégorie</th>
<th scope="col">Notes</th> <th scope="col">Notes</th>
<th scope="col" class="w-32 text-right">Actions</th> <th scope="col" class="w-32 text-right">Actions</th>
</tr> </tr>
@@ -41,7 +40,6 @@
<tbody> <tbody>
<tr v-for="item in items" :key="item.id"> <tr v-for="item in items" :key="item.id">
<td class="font-medium">{{ item.name }}</td> <td class="font-medium">{{ item.name }}</td>
<td>{{ categoryLabel(item.category) }}</td>
<td class="max-w-xs align-middle"> <td class="max-w-xs align-middle">
<span v-if="item.notes" class="block text-sm text-base-content/80 break-words">{{ item.notes }}</span> <span v-if="item.notes" class="block text-sm text-base-content/80 break-words">{{ item.notes }}</span>
<span v-else class="text-base-content/50"></span> <span v-else class="text-base-content/50"></span>

View File

@@ -34,7 +34,7 @@
v-model="searchTerm" v-model="searchTerm"
type="text" type="text"
class="input input-bordered input-sm w-full mt-1" class="input input-bordered input-sm w-full mt-1"
placeholder="Nom, référence ou catégorie…" placeholder="Nom ou référence…"
/> />
</label> </label>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
@@ -93,7 +93,6 @@
<tr> <tr>
<th class="w-24">Aperçu</th> <th class="w-24">Aperçu</th>
<th>Nom</th> <th>Nom</th>
<th>Catégorie</th>
<th>Référence</th> <th>Référence</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
@@ -107,7 +106,6 @@
/> />
</td> </td>
<td>{{ component.name || 'Composant sans nom' }}</td> <td>{{ component.name || 'Composant sans nom' }}</td>
<td>{{ component.typeComposant?.name || '—' }}</td>
<td>{{ component.reference || '—' }}</td> <td>{{ component.reference || '—' }}</td>
<td> <td>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
@@ -232,11 +230,9 @@ const visibleComposants = computed(() => {
? source.filter((component) => { ? source.filter((component) => {
const name = (component?.name || '').toLowerCase() const name = (component?.name || '').toLowerCase()
const reference = (component?.reference || '').toLowerCase() const reference = (component?.reference || '').toLowerCase()
const category = (component?.typeComposant?.name || '').toLowerCase()
return ( return (
name.includes(term) || name.includes(term) ||
reference.includes(term) || reference.includes(term)
category.includes(term)
) )
}) })
: [...source] : [...source]

View File

@@ -33,7 +33,7 @@
v-model="searchTerm" v-model="searchTerm"
type="text" type="text"
class="input input-bordered input-sm w-full mt-1" class="input input-bordered input-sm w-full mt-1"
placeholder="Nom, référence ou catégorie…" placeholder="Nom ou référence…"
/> />
</label> </label>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
@@ -92,7 +92,6 @@
<tr> <tr>
<th class="w-24">Aperçu</th> <th class="w-24">Aperçu</th>
<th>Nom</th> <th>Nom</th>
<th>Catégorie</th>
<th>Référence</th> <th>Référence</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
@@ -106,7 +105,6 @@
/> />
</td> </td>
<td>{{ piece.name || 'Pièce sans nom' }}</td> <td>{{ piece.name || 'Pièce sans nom' }}</td>
<td>{{ piece.typePiece?.name || '—' }}</td>
<td>{{ piece.reference || '—' }}</td> <td>{{ piece.reference || '—' }}</td>
<td> <td>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
@@ -234,11 +232,9 @@ const visiblePieces = computed(() => {
? source.filter((piece) => { ? source.filter((piece) => {
const name = (piece?.name || '').toLowerCase() const name = (piece?.name || '').toLowerCase()
const reference = (piece?.reference || '').toLowerCase() const reference = (piece?.reference || '').toLowerCase()
const category = (piece?.typePiece?.name || '').toLowerCase()
return ( return (
name.includes(term) || name.includes(term) ||
reference.includes(term) || reference.includes(term)
category.includes(term)
) )
}) })
: [...source] : [...source]