Added Reset after Creation & Save for Customers
This commit is contained in:
@@ -227,6 +227,11 @@ const createCustomer = async () => {
|
|||||||
console.log(error)
|
console.log(error)
|
||||||
} else {
|
} else {
|
||||||
mode.value = "show"
|
mode.value = "show"
|
||||||
|
customerInfo.value = {
|
||||||
|
id: 0,
|
||||||
|
name: "",
|
||||||
|
infoData: {}
|
||||||
|
}
|
||||||
toast.add({title: "Kunde erfolgreich erstellt"})
|
toast.add({title: "Kunde erfolgreich erstellt"})
|
||||||
fetchCustomers()
|
fetchCustomers()
|
||||||
}
|
}
|
||||||
@@ -253,6 +258,11 @@ const updateCustomer = async () => {
|
|||||||
.eq('id',customerInfo.value.id)
|
.eq('id',customerInfo.value.id)
|
||||||
console.log(error)
|
console.log(error)
|
||||||
mode.value = "show"
|
mode.value = "show"
|
||||||
|
customerInfo.value = {
|
||||||
|
id: 0,
|
||||||
|
name: "",
|
||||||
|
infoData: {}
|
||||||
|
}
|
||||||
toast.add({title: "Kunde erfolgreich gespeichert"})
|
toast.add({title: "Kunde erfolgreich gespeichert"})
|
||||||
fetchCustomers()
|
fetchCustomers()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user