Many Changes

This commit is contained in:
2024-02-01 22:17:56 +01:00
parent 34d1eb9c71
commit bd09d07698
12 changed files with 91 additions and 29 deletions

View File

@@ -21,6 +21,13 @@
@select="selectItem"
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
>
<template #finish-data="{row}">
<UButton
icon="i-heroicons-check"
variant="ghost"
@click="markAsFinished(row)"
/>
</template>
<template #created_at-data="{row}">
{{row.created_at ? dayjs(row.created_at).format("DD.MM.YY HH:mm") : ''}}
</template>
@@ -33,6 +40,9 @@
<template #customer-data="{row}">
{{dataStore.customers.find(customer => customer.id === row.customer) ? dataStore.customers.find(customer => customer.id === row.customer).name : "" }}
</template>
<template #plant-data="{row}">
{{dataStore.getPlantById(row.plant) ? dataStore.getPlantById(row.plant).name : "" }}
</template>
</UTable>
</div>
@@ -50,7 +60,10 @@ const router = useRouter()
const mode = ref("show")
const columns = [
{
key:"finish"
},{
key: "created_at",
label: "Erstellt am:",
sortable: true
@@ -106,6 +119,10 @@ const filteredRows = computed(() => {
const selectItem = (item) => {
router.push(`/tasks/show/${item.id} `)
}
const markAsFinished = (item) => {
dataStore.updateItem("tasks", {...item, categorie: "Erledigt"})
}
</script>
<style scoped>