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

@@ -70,17 +70,17 @@ const cancelEditorCreate = () => {
}
}
const updateCustomer = async () => {
const updateItem = async () => {
const {error} = await supabase
.from("contacts")
.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(`/contacts/show/${currentContact.id}`)
toast.add({title: "Kontakt erfolgreich gespeichert"})
dataStore.fetchContacts()
}
@@ -261,7 +261,7 @@ setupPage()
<template #footer>
<UButton
v-if="mode == 'edit'"
@click="updateCustomer"
@click="updateItem"
>
Speichern
</UButton>