This commit is contained in:
2024-04-08 21:33:10 +02:00
parent 0f7555907b
commit 9fa1059301
3 changed files with 27 additions and 23 deletions

View File

@@ -507,8 +507,8 @@ export const useDataStore = defineStore('data', () => {
const createHistoryItem = (key,prop) => {
console.log("OLD: " + prop.data.o)
console.log("NEW: " + prop.data.n)
//console.log("OLD: " + prop.data.o)
//console.log("NEW: " + prop.data.n)
let name = "" || key
let oldVal = prop.data.o || "-"
@@ -659,11 +659,11 @@ export const useDataStore = defineStore('data', () => {
const checkIfNaN = (x) => {
return typeof x === "number" && x !== x;
}
console.log(key)
console.log(checkIfNaN(key))
//console.log(key)
//console.log(checkIfNaN(key))
if(key !== "fullName" && key !== "phases") {
console.log(historyItem)
//console.log(historyItem)
itemsToCreate.push(historyItem)
}
@@ -672,28 +672,15 @@ export const useDataStore = defineStore('data', () => {
if(oldData) {
let result = deepDiffMapper.map(oldData,newData)
console.log(result)
//console.log(result)
for (let prop in result) {
//console.log(prop)
checkPropState(prop,result[prop])
//console.log(prop)
//console.log(result[prop])
}
} else {
let historyItem = {
text: `${dataTypes[dataType].labelSingle} erstellt`,
createdBy: activeProfile.value.id,
@@ -702,7 +689,7 @@ export const useDataStore = defineStore('data', () => {
historyItem[dataTypes[dataType].historyItemHolder] = newData.id
console.log(historyItem)
//console.log(historyItem)
itemsToCreate.push(historyItem)
}
@@ -803,7 +790,6 @@ export const useDataStore = defineStore('data', () => {
const {tenants, ...newData} = data
console.log(newData)
await generateHistoryItems(dataType,data,oldData)