Added Archiving & Some Tidying in Vehicles
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user