Many Changes in Navigation, Shortcuts, Search and Data Pulling directly from Supabase
This commit is contained in:
@@ -813,7 +813,12 @@ export const useDataStore = defineStore('data', () => {
|
||||
} else if (supabaseData) {
|
||||
console.log(supabaseData)
|
||||
await generateHistoryItems(dataType, supabaseData[0])
|
||||
//await eval( dataType + '.value.push(' + JSON.stringify(...supabaseData) + ')')
|
||||
|
||||
if(dataType !== "statementallocations"){
|
||||
await eval( dataType + '.value.push(' + JSON.stringify(...supabaseData) + ')')
|
||||
}
|
||||
|
||||
|
||||
toast.add({title: `${dataTypes[dataType].labelSingle} hinzugefügt`})
|
||||
if(dataTypes[dataType].redirect) await router.push(`/${dataType}/show/${supabaseData[0].id}`)
|
||||
return supabaseData
|
||||
@@ -1450,8 +1455,12 @@ export const useDataStore = defineStore('data', () => {
|
||||
|
||||
|
||||
//Get Item By Id
|
||||
const getProductById = computed(() => (itemId) => {
|
||||
return products.value.find(item => item.id === itemId)
|
||||
const getProductById = computed(() => async (itemId) => {
|
||||
|
||||
return await useSupabaseSelectSingle("products",itemId, "*")
|
||||
|
||||
|
||||
//return products.value.find(item => item.id === itemId)
|
||||
})
|
||||
|
||||
const getServiceById = computed(() => (itemId) => {
|
||||
|
||||
Reference in New Issue
Block a user