Added Archiving
This commit is contained in:
@@ -191,6 +191,23 @@ const filteredIncomingInvoices = computed(() => {
|
||||
|
||||
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>
|
||||
|
||||
<template>
|
||||
@@ -224,6 +241,21 @@ setup()
|
||||
Offen
|
||||
</UBadge>
|
||||
</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>
|
||||
|
||||
<UDashboardPanelContent
|
||||
@@ -259,6 +291,15 @@ setup()
|
||||
</div>
|
||||
</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">
|
||||
<tbody>
|
||||
<tr class="flex-row flex justify-between">
|
||||
|
||||
Reference in New Issue
Block a user