Added Archiving & Some Tidying in Vehicles

This commit is contained in:
2024-11-08 18:38:54 +01:00
parent c67c4a70c4
commit a61382486f
2 changed files with 115 additions and 43 deletions

View File

@@ -43,6 +43,13 @@
@select="(i) => router.push(`/vehicles/show/${i.id}`) "
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Fahrzeuge anzuzeigen' }"
>
<template #active-data="{row}">
<UIcon
:name="row.active ? 'i-heroicons-check' : 'i-heroicons-x-mark'"
:class="['w-5', 'h-5', ... row.active ? ['text-primary-500'] : ['text-rose-600'] ]"
/>
</template>
<template #licensePlate-data="{row}">
<span v-if="row === filteredRows[selectedItem]" class="font-bold text-primary-500">{{row.licensePlate}}</span>
<span v-else>{{row.licensePlate}}</span>
@@ -101,9 +108,17 @@ setupPage()
const templateColumns = [
{
key: 'active',
label: "Aktiv:",
sortable: true
},{
key: 'licensePlate',
label: "Kennzeichen:",
sortable: true
},{
key: 'vin',
label: "Identifikationnr.:",
sortable: true
},
{
key: "type",
@@ -117,7 +132,7 @@ const columns = computed(() => templateColumns.filter((column) => selectedColumn
const searchString = ref('')
const filteredRows = computed(() => {
return useSearch(searchString.value, items.value)
return useListFilter(searchString.value, items.value)
})
</script>