feat: infrastructure assets management with warranty tracking and EAN lookup integration
This commit is contained in:
@@ -11,13 +11,24 @@ const props = defineProps({
|
||||
commandes: Object,
|
||||
services: Array,
|
||||
fournisseurs: Array,
|
||||
communes: Array,
|
||||
filters: Object,
|
||||
})
|
||||
|
||||
const page = usePage()
|
||||
const statuts = page.props.config?.statuts ?? {}
|
||||
|
||||
const filters = reactive({ ...props.filters })
|
||||
const filters = reactive({
|
||||
search: '',
|
||||
service_id: '',
|
||||
fournisseur_id: '',
|
||||
commune_id: '',
|
||||
statut: '',
|
||||
priorite: '',
|
||||
date_from: '',
|
||||
date_to: '',
|
||||
...props.filters
|
||||
})
|
||||
const deleteTarget = ref(null)
|
||||
|
||||
function applyFilters() {
|
||||
@@ -97,6 +108,12 @@ function formatCurrency(v) {
|
||||
<option value="haute">Haute</option>
|
||||
<option value="normale">Normale</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-blue-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 grid gap-3 sm:grid-cols-3">
|
||||
@@ -120,6 +137,7 @@ function formatCurrency(v) {
|
||||
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">N°</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Objet</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">Priorité</th>
|
||||
@@ -141,6 +159,7 @@ function formatCurrency(v) {
|
||||
<p class="truncate text-gray-800">{{ cmd.objet }}</p>
|
||||
</td>
|
||||
<td class="px-4 py-3 whitespace-nowrap text-gray-600">{{ cmd.service?.nom }}</td>
|
||||
<td class="px-4 py-3 whitespace-nowrap text-gray-600">{{ cmd.commune?.nom ?? '—' }}</td>
|
||||
<td class="px-4 py-3 whitespace-nowrap text-gray-600">{{ cmd.fournisseur?.nom ?? '—' }}</td>
|
||||
<td class="px-4 py-3"><StatutBadge :statut="cmd.statut" /></td>
|
||||
<td class="px-4 py-3"><PrioriteBadge :priorite="cmd.priorite" /></td>
|
||||
|
||||
Reference in New Issue
Block a user