Added Automatic HistoryItems to Events,Customers,Vendors

This commit is contained in:
2024-04-08 15:41:28 +02:00
parent 3a0f3f75b4
commit 44a0e10a94
5 changed files with 282 additions and 15 deletions

View File

@@ -23,6 +23,7 @@ const itemInfo = ref({
active: true,
isCompany: true
})
const oldItemInfo = ref({})
//Functions
const setupPage = async () => {
@@ -31,6 +32,7 @@ const setupPage = async () => {
}
if(mode.value === "edit") itemInfo.value = currentItem.value
if(currentItem.value.id) oldItemInfo.value = JSON.parse(JSON.stringify(currentItem.value))
}
const editItem = async () => {
@@ -54,7 +56,7 @@ setupPage()
<template #right>
<UButton
v-if="mode === 'edit'"
@click="dataStore.updateItem('customers',itemInfo)"
@click="dataStore.updateItem('customers',itemInfo,oldItemInfo)"
>
Speichern
</UButton>