Document Restructure
Introduced ExternalDevices Settingspage Added DocumentDisplay.vue Component Some Changes to Spaces
This commit is contained in:
@@ -14,6 +14,10 @@ export const useDataStore = defineStore('data', {
|
||||
},
|
||||
timeConfig: {
|
||||
timeTypes: [] as any[]
|
||||
},
|
||||
tags: {
|
||||
documents: [] as any[],
|
||||
products: [] as any[]
|
||||
}
|
||||
},
|
||||
profiles: [] as any[],
|
||||
@@ -127,7 +131,7 @@ export const useDataStore = defineStore('data', {
|
||||
},
|
||||
async fetchVendorInvoices() {
|
||||
// @ts-ignore
|
||||
this.vendorInvoices = (await supabase.from("vendorinvoices").select()).data
|
||||
this.vendorInvoices = (await supabase.from("vendorInvoices").select()).data
|
||||
},
|
||||
async fetchDocuments() {
|
||||
// @ts-ignore
|
||||
@@ -135,7 +139,7 @@ export const useDataStore = defineStore('data', {
|
||||
|
||||
for(const [index,doc] of this.documents.entries()){
|
||||
// @ts-ignore
|
||||
this.documents[index].url = (await supabase.storage.from('documents').createSignedUrl(doc.path, 60 * 60)).data.signedUrl
|
||||
this.documents[index].url = (await supabase.storage.from('files').createSignedUrl(doc.path, 60 * 60)).data.signedUrl
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -156,6 +160,7 @@ export const useDataStore = defineStore('data', {
|
||||
getProductById: (state) => (productId:number) => state.products.find(product => product.id === productId),
|
||||
getVendorById: (state) => (itemId:number) => state.vendors.find(item => item.id === itemId),
|
||||
getVendorInvoiceById: (state) => (itemId:number) => state.vendorInvoices.find(item => item.id === itemId),
|
||||
getSpaceById: (state) => (itemId:number) => state.spaces.find(item => item.id === itemId),
|
||||
getProjectById: (state) => (projectId:number) => {
|
||||
let project = state.projects.find(project => project.id === projectId)
|
||||
|
||||
@@ -186,6 +191,7 @@ export const useDataStore = defineStore('data', {
|
||||
return times
|
||||
|
||||
},
|
||||
getDocumentsByProjectId:(state) => (itemId: number) => state.documents.filter(item => item.project == itemId ),
|
||||
getFormSubmitsWithLabelProp: (state) => (state.formSubmits.map(submit => {return{...submit, label: submit.id}})),
|
||||
getResources: (state) => {
|
||||
return [
|
||||
@@ -221,6 +227,7 @@ export const useDataStore = defineStore('data', {
|
||||
]
|
||||
},
|
||||
getEventTypes: (state) => state.ownTenant.calendarConfig.eventTypes,
|
||||
getTimeTypes: (state) => state.ownTenant.timeConfig.timeTypes
|
||||
getTimeTypes: (state) => state.ownTenant.timeConfig.timeTypes,
|
||||
getDocumentTags: (state) => state.ownTenant.tags.documents,
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user