Removed Filetags

This commit is contained in:
2025-01-11 18:57:56 +01:00
parent 39b6ad28d0
commit f48bcdcd7b

View File

@@ -87,12 +87,12 @@ export const useFiles = () => {
}
const selectDocuments = async (sortColumn = null, folder = null) => {
let data = null
let data = []
if(sortColumn !== null ) {
data = (await supabase
.from("files")
.select('*, filetags(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.select('*, incominginvoice(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.eq("tenant", profileStore.currentTenant)
.not("path","is",null)
.not("archived","is",true)
@@ -100,7 +100,7 @@ export const useFiles = () => {
} else {
data = (await supabase
.from("files")
.select('*, filetags(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.select('*, incominginvoice(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.eq("tenant", profileStore.currentTenant)
.not("path","is",null)
.not("archived","is",true)).data
@@ -135,7 +135,7 @@ export const useFiles = () => {
if(sortColumn !== null ) {
data = (await supabase
.from("files")
.select('*, filetags(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.select('*, incominginvoice(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.in("id",documentIds)
.eq("tenant", profileStore.currentTenant)
.not("path","is",null)
@@ -144,7 +144,7 @@ export const useFiles = () => {
} else {
data = (await supabase
.from("files")
.select('*, filetags(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.select('*, incominginvoice(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.in("id",documentIds)
.not("path","is",null)
.not("archived","is",true)
@@ -177,7 +177,7 @@ export const useFiles = () => {
const selectDocument = async (id) => {
const {data,error} = await supabase
.from("files")
.select('*, filetags(*)')
.select('*')
.eq("id",id)
.single()