Added Archiving
This commit is contained in:
@@ -191,6 +191,23 @@ const filteredIncomingInvoices = computed(() => {
|
|||||||
|
|
||||||
setup()
|
setup()
|
||||||
|
|
||||||
|
|
||||||
|
const archiveStatement = async () => {
|
||||||
|
|
||||||
|
let temp = itemInfo.value
|
||||||
|
delete temp.statementallocations
|
||||||
|
|
||||||
|
await dataStore.updateItem("bankstatements", {...temp,archived:true})
|
||||||
|
|
||||||
|
|
||||||
|
const {data,error} = await supabase.from("historyitems").insert({
|
||||||
|
createdBy: useProfileStore().activeProfile.id,
|
||||||
|
tenant: useProfileStore().currentTenant,
|
||||||
|
text: "Bankbuchung archiviert",
|
||||||
|
bankStatement: itemInfo.value.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -224,6 +241,21 @@ setup()
|
|||||||
Offen
|
Offen
|
||||||
</UBadge>
|
</UBadge>
|
||||||
</template>
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<ButtonWithConfirm
|
||||||
|
color="rose"
|
||||||
|
variant="outline"
|
||||||
|
@confirmed="archiveStatement"
|
||||||
|
>
|
||||||
|
<template #button>
|
||||||
|
Archivieren
|
||||||
|
</template>
|
||||||
|
<template #header>
|
||||||
|
<span class="text-md text-black font-bold">Archivieren bestätigen</span>
|
||||||
|
</template>
|
||||||
|
Möchten Sie die Kontobewegung wirklich archivieren?
|
||||||
|
</ButtonWithConfirm>
|
||||||
|
</template>
|
||||||
</UDashboardNavbar>
|
</UDashboardNavbar>
|
||||||
|
|
||||||
<UDashboardPanelContent
|
<UDashboardPanelContent
|
||||||
@@ -259,6 +291,15 @@ setup()
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<UAlert
|
||||||
|
v-if="itemInfo.archived"
|
||||||
|
color="rose"
|
||||||
|
variant="outline"
|
||||||
|
:title="`Kontobewegung archiviert`"
|
||||||
|
icon="i-heroicons-archive-box"
|
||||||
|
class="mb-5"
|
||||||
|
/>
|
||||||
|
|
||||||
<table class="w-full" v-if="itemInfo.id">
|
<table class="w-full" v-if="itemInfo.id">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="flex-row flex justify-between">
|
<tr class="flex-row flex justify-between">
|
||||||
|
|||||||
Reference in New Issue
Block a user