Supabase Removals Frontend

This commit is contained in:
2026-02-14 12:48:59 +01:00
parent 053f184a33
commit 55699da42c
28 changed files with 135 additions and 222 deletions

View File

@@ -2,7 +2,6 @@
const toast = useToast()
const dataStore = useDataStore()
const supabase = useSupabaseClient()
const modal = useModal()
const props = defineProps({
type: {
@@ -35,11 +34,10 @@ const item = ref({})
const setupPage = async () => {
if(props.mode === "show") {
//Load Data for Show
item.value = await useEntities(props.type).selectSingle(props.id, dataType.supabaseSelectWithInformation || "*")
item.value = await useEntities(props.type).selectSingle(props.id, dataType.selectWithInformation || "*")
} else if(props.mode === "edit") {
//Load Data for Edit
const data = JSON.stringify(await useEntities(props.type).selectSingle(props.id)/*(await supabase.from(props.type).select().eq("id", props.id).single()).data*/)
//await useSupabaseSelectSingle(type, route.params.id)
const data = JSON.stringify(await useEntities(props.type).selectSingle(props.id))
item.value = data
} else if(props.mode === "create") {
@@ -48,7 +46,7 @@ const setupPage = async () => {
} else if(props.mode === "list") {
//Load Data for List
items.value = await useEntities(props.type).select(dataType.supabaseSelectWithInformation || "*", dataType.supabaseSortColumn,dataType.supabaseSortAscending || false)
items.value = await useEntities(props.type).select(dataType.selectWithInformation || "*", dataType.sortColumn,dataType.sortAscending || false)
}
loaded.value = true
@@ -95,4 +93,4 @@ setupPage()
<style scoped>
</style>
</style>