Many Changes

This commit is contained in:
2024-01-04 12:27:46 +01:00
parent 57e856c71c
commit 991cac18f2
31 changed files with 1504 additions and 297 deletions

View File

@@ -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>