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

@@ -72,7 +72,7 @@ const cancelEditorCreate = () => {
}
}
const updateCustomer = async () => {
const updateItem = async () => {
const {error} = await supabase
.from("vehicles")
.update(itemInfo.value)
@@ -80,13 +80,8 @@ const updateCustomer = async () => {
if(error) {
console.log(error)
} else {
mode.value = "show"
itemInfo.value = {
id: 0,
name: "",
licensePlate: "",
type: ""
}
router.push(`/vehicles/show/${currentItem.id}`)
toast.add({title: "Fahrzeug erfolgreich gespeichert"})
dataStore.fetchVehicles()
}
@@ -187,7 +182,7 @@ setupPage()
<template #footer>
<UButton
v-if="mode == 'edit'"
@click="updateCustomer"
@click="updateItem"
>
Speichern
</UButton>