feat: infrastructure assets management with warranty tracking and EAN lookup integration

This commit is contained in:
jeremy bayse
2026-04-09 21:51:43 +02:00
parent 3544c77bd1
commit b28c56c94c
46 changed files with 2961 additions and 414 deletions

View File

@@ -9,13 +9,21 @@ const props = defineProps({
contrats: Object,
services: Array,
fournisseurs: Array,
communes: Array,
filters: Object,
statuts: Object,
})
const page = usePage()
const filters = reactive({ ...props.filters })
const filters = reactive({
search: '',
service_id: '',
fournisseur_id: '',
commune_id: '',
statut: '',
...props.filters
})
const deleteTarget = ref(null)
function applyFilters() {
@@ -93,6 +101,12 @@ const statutColors = {
<option value="">Tous les statuts</option>
<option v-for="(label, key) in statuts" :key="key" :value="key">{{ label }}</option>
</select>
<select v-model="filters.commune_id" @change="applyFilters"
class="rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-indigo-500 focus:outline-none">
<option value="">Toutes communes</option>
<option v-for="c in communes" :key="c.id" :value="c.id">{{ c.nom }}</option>
</select>
</div>
<div class="mt-3 flex justify-end">
@@ -111,6 +125,7 @@ const statutColors = {
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Titre</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Service</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Ville</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Fournisseur</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Statut</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Date début</th>
@@ -128,6 +143,7 @@ const statutColors = {
</Link>
</td>
<td class="px-4 py-3 whitespace-nowrap text-gray-600">{{ cnt.service?.nom }}</td>
<td class="px-4 py-3 whitespace-nowrap text-gray-600">{{ cnt.commune?.nom ?? '—' }}</td>
<td class="px-4 py-3 whitespace-nowrap text-gray-600">{{ cnt.fournisseur?.nom ?? '—' }}</td>
<td class="px-4 py-3">
<span :class="['inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium', statutColors[cnt.statut]]">