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

@@ -12,9 +12,10 @@ const dataStore = useDataStore()
const route = useRoute()
const itemInfo = ref({})
const oldItemInfo = ref({})
const setupPage = () => {
if(route.params.id) itemInfo.value = dataStore.getProfileById(route.params.id)
if(itemInfo.value.id) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value))
}
const selectedPresetRange = ref("Dieser Monat")
@@ -140,7 +141,7 @@ changeRange()
<div v-if="item.label === 'Informationen'">
<Toolbar>
<UButton
@click="dataStore.updateItem('profiles',itemInfo)"
@click="dataStore.updateItem('profiles',{...itemInfo, fullName: itemInfo.firstName + ' ' + itemInfo.lastName},oldItemInfo)"
>
Speichern
</UButton>