|
|
|
@ -367,7 +367,7 @@ export const useProductsStore = create(
|
|
|
|
|
} else {
|
|
|
|
|
mergedList = quotationList.map(prevQuotation => {
|
|
|
|
|
if (prevQuotation.key === formValues.key) {
|
|
|
|
|
const changedList = []
|
|
|
|
|
const changedObject = {}
|
|
|
|
|
for (const [key, value] of Object.entries(formValues)) {
|
|
|
|
|
if (key === 'use_dates' || key === 'id' || key === 'key') continue
|
|
|
|
|
|
|
|
|
@ -375,9 +375,7 @@ export const useProductsStore = create(
|
|
|
|
|
const hasChanged = preValue !== value
|
|
|
|
|
|
|
|
|
|
if (hasChanged) {
|
|
|
|
|
changedList.push({
|
|
|
|
|
[key]: preValue,
|
|
|
|
|
})
|
|
|
|
|
changedObject[key] = value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -393,7 +391,7 @@ export const useProductsStore = create(
|
|
|
|
|
use_dates_start: formValues.use_dates_start,
|
|
|
|
|
use_dates_end: formValues.use_dates_end,
|
|
|
|
|
weekdays: formValues.weekdays,
|
|
|
|
|
lastedit_changed: JSON.stringify(changedList, null, 2)
|
|
|
|
|
lastedit_changed: changedObject
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return prevQuotation
|
|
|
|
|