Dateimodal überarbeiten und Dateitypen pflegen
This commit is contained in:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user