Updated in Files and Archiving

This commit is contained in:
2025-01-07 12:42:00 +01:00
parent af38afc5b5
commit 0bab558c75
5 changed files with 151 additions and 286 deletions

View File

@@ -92,16 +92,18 @@ export const useFiles = () => {
if(sortColumn !== null ) {
data = (await supabase
.from("files")
.select('*, filetags(*)')
.select('*, filetags(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.eq("tenant", profileStore.currentTenant)
.not("path","is",null)
.not("archived","is",true)
.order(sortColumn, {ascending: true})).data
} else {
data = (await supabase
.from("files")
.select('*, filetags(*)')
.select('*, filetags(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.eq("tenant", profileStore.currentTenant)
.not("path","is",null)).data
.not("path","is",null)
.not("archived","is",true)).data
}
@@ -133,17 +135,19 @@ export const useFiles = () => {
if(sortColumn !== null ) {
data = (await supabase
.from("files")
.select('*, filetags(*)')
.select('*, filetags(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.in("id",documentIds)
.eq("tenant", profileStore.currentTenant)
.not("path","is",null)
.not("archived","is",true)
.order(sortColumn, {ascending: true})).data
} else {
data = (await supabase
.from("files")
.select('*, filetags(*)')
.select('*, filetags(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)')
.in("id",documentIds)
.not("path","is",null)
.not("archived","is",true)
.eq("tenant", profileStore.currentTenant)).data
}