Many Changes
This commit is contained in:
@@ -71,17 +71,16 @@ const cancelEditorCreate = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const updateCustomer = async () => {
|
||||
const updateItem = async () => {
|
||||
const {error} = await supabase
|
||||
.from("contracts")
|
||||
.update(itemInfo.value)
|
||||
.eq('id',itemInfo.value.id)
|
||||
console.log(error)
|
||||
mode.value = "show"
|
||||
itemInfo.value = {
|
||||
id: 0,
|
||||
name: "",
|
||||
if(error) {
|
||||
console.log(error)
|
||||
}
|
||||
|
||||
router.push(`/contracts/show/${currentContract.id}`)
|
||||
toast.add({title: "Vertrag erfolgreich gespeichert"})
|
||||
dataStore.fetchContracts()
|
||||
}
|
||||
@@ -192,7 +191,7 @@ setupPage()
|
||||
<template #footer>
|
||||
<UButton
|
||||
v-if="mode == 'edit'"
|
||||
@click="updateCustomer"
|
||||
@click="updateItem"
|
||||
>
|
||||
Speichern
|
||||
</UButton>
|
||||
|
||||
Reference in New Issue
Block a user