Fixed Invoicing Problem and some other Changes

This commit is contained in:
2024-12-31 16:07:15 +01:00
parent 9a70879778
commit cacdb442ca
5 changed files with 426 additions and 369 deletions

View File

@@ -1,6 +1,7 @@
<script setup>
const route = useRoute()
const dataStore = useDataStore()
const supabase = useSupabaseClient()
const type = route.params.type
@@ -19,7 +20,17 @@ const setupPage = async () => {
item.value = await useSupabaseSelectSingle(type, route.params.id, dataType.supabaseSelectWithInformation || "*")
} else if(mode.value === "edit") {
//Load Data for Edit
item.value = await useSupabaseSelectSingle(type, route.params.id)
const data = JSON.stringify((await supabase.from(type).select().eq("id", route.params.id).single()).data)
//await useSupabaseSelectSingle(type, route.params.id)
console.log(JSON.parse(data))
item.value = data
console.log(item.value)
} else if(mode.value === "create") {
//Load Data for Create
item.value = JSON.stringify({})
console.log(item.value)
} else if(mode.value === "list") {
//Load Data for List
items.value = await useSupabaseSelect(type, dataType.supabaseSelectWithInformation || "*", dataType.supabaseSortColumn)