Supabase Removals Frontend
This commit is contained in:
@@ -15,7 +15,7 @@ const showDocument = ref(false)
|
||||
const uri = ref("")
|
||||
|
||||
const setupPage = async () => {
|
||||
letterheads.value = await useSupabaseSelect("letterheads","*")
|
||||
letterheads.value = await useEntities("letterheads").select("*")
|
||||
|
||||
preloadedContent.value = `<p></p><p></p><p></p>`
|
||||
}
|
||||
@@ -105,4 +105,4 @@ const contentChanged = (content) => {
|
||||
.previewDocumentMobile {
|
||||
aspect-ratio: 1 / 1.414;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -20,7 +20,6 @@ defineShortcuts({
|
||||
})
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const supabase = useSupabaseClient()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const toast = useToast()
|
||||
@@ -38,7 +37,7 @@ const openTab = ref(0)
|
||||
//Functions
|
||||
const setupPage = async () => {
|
||||
if(mode.value === "show" || mode.value === "edit"){
|
||||
itemInfo.value = await useSupabaseSelectSingle("roles",route.params.id,"*")
|
||||
itemInfo.value = await useEntities("roles").selectSingle(route.params.id,"*")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,4 +194,4 @@ td {
|
||||
padding-bottom: 0.15em;
|
||||
padding-top: 0.15em;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
const items = ref([])
|
||||
const setup = async () => {
|
||||
items.value = await useSupabaseSelect("roles","*")
|
||||
items.value = await useEntities("roles").select("*")
|
||||
}
|
||||
|
||||
setup()
|
||||
@@ -19,4 +19,4 @@ setup()
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
<script setup>
|
||||
import axios from "axios"
|
||||
const supabase = useSupabaseClient()
|
||||
const dataStore = useDataStore()
|
||||
const profileStore = useProfileStore()
|
||||
|
||||
const createEMailAddress = ref("")
|
||||
const createEMailType = ref("imap")
|
||||
@@ -96,4 +92,4 @@ const columns = computed(() => templateColumns.filter((column) => selectedColumn
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -41,7 +41,6 @@ const setupPage = async (sort_column = null, sort_direction = null) => {
|
||||
console.log(item.value)
|
||||
} else if (mode.value === "list") {
|
||||
//Load Data for List
|
||||
//items.value = await useEntities(type).select(dataType.supabaseSelectWithInformation, sort_column || dataType.supabaseSortColumn, sort_direction === "asc", true)
|
||||
items.value = await useEntities(type).select({
|
||||
filters: {},
|
||||
sort: [],
|
||||
|
||||
@@ -64,7 +64,7 @@ const pageLimit = ref(15)
|
||||
const page = ref(tempStore.pages[type] || 1)
|
||||
|
||||
const sort = ref({
|
||||
column: dataType.supabaseSortColumn || "created_at",
|
||||
column: dataType.sortColumn || "created_at",
|
||||
direction: 'desc'
|
||||
})
|
||||
|
||||
@@ -156,7 +156,7 @@ const setupPage = async () => {
|
||||
|
||||
|
||||
const {data,meta} = await useEntities(type).selectPaginated({
|
||||
select: dataType.supabaseSelectWithInformation || "*",
|
||||
select: dataType.selectWithInformation || "*",
|
||||
filters: filters,
|
||||
sort: [{field: sort.value.column, direction: sort.value.direction}],
|
||||
page: page.value,
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import {useFunctions} from "~/composables/useFunctions.js";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const supabase = useSupabaseClient()
|
||||
const profileStore = useProfileStore()
|
||||
const toast = useToast()
|
||||
const auth = useAuthStore()
|
||||
@@ -143,4 +142,4 @@ const addMessage = async () => {
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -10,15 +10,6 @@ const showClosedTickets = ref(false)
|
||||
const selectedTenant = ref(null)
|
||||
|
||||
const setup = async () => {
|
||||
/*if(profileStore.currentTenant === 5) {
|
||||
tickets.value = (await supabase.from("tickets").select("*,created_by(*), ticketmessages(*), tenant(*)").order("created_at", {ascending: false})).data
|
||||
} else {
|
||||
tickets.value = (await supabase.from("tickets").select("*,created_by(*), ticketmessages(*)").eq("tenant",profileStore.currentTenant).order("created_at", {ascending: false})).data
|
||||
}
|
||||
|
||||
if(profileStore.currentTenant === 5) {
|
||||
tenants.value = (await supabase.from("tenants").select().order("id")).data
|
||||
}*/
|
||||
tickets.value = await useEntities("tickets").select("*,created_by(*), ticketmessages(*)", "created_at", false)
|
||||
|
||||
|
||||
@@ -107,4 +98,4 @@ const filteredRows = computed(() => {
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user