Added ArchiveButton.vue

This commit is contained in:
2025-09-24 19:43:04 +02:00
parent 4a05bd5bc3
commit dd2bf7a8ff
6 changed files with 92 additions and 53 deletions

View File

@@ -254,19 +254,12 @@ const archiveStatement = async () => {
</UBadge>
</template>
<template #right>
<ButtonWithConfirm
<ArchiveButton
color="rose"
variant="outline"
type="bankstatements"
@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>

View File

@@ -1523,21 +1523,14 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
</UButton>
</template>
<template #right>
<ButtonWithConfirm
v-if="itemInfo.state === 'Entwurf' || itemInfo.type === 'serialInvoices'"
<ArchiveButton
color="rose"
type="createddocuments"
v-if="itemInfo.state === 'Entwurf' || itemInfo.type === 'serialInvoices'"
variant="outline"
@confirmed="useEntities('createddocuments').update(itemInfo.id,{archived: true}),
router.push('/')"
>
<template #button>
Archivieren
</template>
<template #header>
<span class="text-md dark:text-whitetext-black font-bold">Archivieren bestätigen</span>
</template>
Möchten Sie diesen Ausgangsbeleg wirklich archivieren?
</ButtonWithConfirm>
/>
<UButton
icon="i-mdi-content-save"
@click="saveDocument('Entwurf',true)"

View File

@@ -170,19 +170,12 @@ const findIncomingInvoiceErrors = computed(() => {
<template>
<UDashboardNavbar :title="'Eingangsbeleg erstellen'">
<template #right>
<ButtonWithConfirm
<ArchiveButton
color="rose"
variant="outline"
type="incominginvoices"
@confirmed="useEntities('incominginvoices').archive(route.params.id)"
>
<template #button>
Archivieren
</template>
<template #header>
<span class="text-md text-black font-bold">Archivieren bestätigen</span>
</template>
Möchten Sie den Eingangsbeleg wirklich archivieren?
</ButtonWithConfirm>
/>
<UButton
@click="updateIncomingInvoice(false)"
>