Added Automatic HistoryItems to Events,Customers,Vendors
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user