Added Automatic HistoryItems to more DataTypes

This commit is contained in:
2024-04-08 21:04:32 +02:00
parent ca62d492ba
commit 0f7555907b
7 changed files with 205 additions and 60 deletions

View File

@@ -82,6 +82,7 @@ const itemInfo = ref({
customer: 0,
users: [dataStore.activeProfile.id]
})
const oldItemInfo = ref({})
const tags = dataStore.getDocumentTags
@@ -103,6 +104,7 @@ const setupPage = () => {
itemInfo.value.customer = dataStore.getPlantById(itemInfo.value.plant).customer
}
}
if(currentItem.value) oldItemInfo.value = JSON.parse(JSON.stringify(currentItem.value))
}
const cancelEditorCreate = () => {
@@ -177,7 +179,7 @@ setupPage()
<template #right>
<UButton
v-if="mode === 'edit'"
@click="dataStore.updateItem('projects',itemInfo)"
@click="dataStore.updateItem('projects',itemInfo,oldItemInfo)"
>
Speichern
</UButton>