Cahnges
This commit is contained in:
@@ -8,21 +8,22 @@ definePageMeta({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
|
const profileStore = useProfileStore()
|
||||||
const supabase = useSupabaseClient()
|
const supabase = useSupabaseClient()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|
||||||
const {vendors} = storeToRefs(useDataStore())
|
const availableDocuments = ref([])
|
||||||
const {fetchVendorInvoices} = useDataStore()
|
const setup = async () => {
|
||||||
|
let filetype = (await supabase.from("filetags").select().eq("tenant",profileStore.currentTenant).eq("incomingDocumentType","invoices").single()).data.id
|
||||||
|
console.log(filetype)
|
||||||
|
let ids = (await supabase.from("files").select("id").eq("tenant",profileStore.currentTenant).eq("type", filetype)).data.map(i => i.id)
|
||||||
|
availableDocuments.value = await useFiles().selectSomeDocuments(ids)
|
||||||
|
|
||||||
const availableDocuments = computed(() => {
|
}
|
||||||
|
|
||||||
//console.log(dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung') && !dataStore.incominginvoices.find(x => x.document === i.id)))
|
setup()
|
||||||
//console.log(dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung')).length)
|
|
||||||
|
|
||||||
return dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung') && !i.tags.includes("Archiviert") && !dataStore.incominginvoices.find(x => x.document === i.id))
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
//let currentDocument = ref(null)
|
//let currentDocument = ref(null)
|
||||||
|
|||||||
Reference in New Issue
Block a user