Dateimodal überarbeiten und Dateitypen pflegen

This commit is contained in:
2026-05-19 12:47:51 +02:00
parent 941f1d819b
commit 5fc7cc9604
13 changed files with 360 additions and 319 deletions

View File

@@ -394,6 +394,12 @@ const getPostSaveRoute = () => {
return null
}
const canArchiveItem = computed(() => {
if (!item.value?.id) return false
if (dataType.canArchiveFunction) return dataType.canArchiveFunction(item.value)
return true
})
const createItem = async () => {
let ret = null
@@ -461,7 +467,7 @@ const updateItem = async () => {
<template #right>
<ArchiveButton
color="error"
v-if="platform !== 'mobile'"
v-if="platform !== 'mobile' && canArchiveItem"
variant="outline"
:type="type"
@confirmed="useEntities(type).archive(item.id)"