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,20 +254,13 @@ const updateItem = async () => {
>{{item.id ? `${dataType.labelSingle} bearbeiten` : `${dataType.labelSingle} erstellen` }}</h1>
</template>
<template #right>
<ButtonWithConfirm
v-if="platform !== 'mobile'"
<ArchiveButton
color="rose"
v-if="platform !== 'mobile'"
variant="outline"
@confirmed="dataStore.updateItem(type,{...item,archived: true}, oldItem)"
>
<template #button>
Archivieren
</template>
<template #header>
<span class="text-md text-black dark:text-white font-bold">Archivieren bestätigen</span>
</template>
Möchten Sie das {{dataType.labelSingle}} {{item[dataType.templateColumns.find(i => i.title).key]}} wirklich archivieren?
</ButtonWithConfirm>
:type="type"
@confirmed="useEntities(type).archive(item.id)"
/>
<UButton
v-if="item.id"
@click="updateItem"