Changes
This commit is contained in:
@@ -130,6 +130,10 @@ export const useDataStore = defineStore('data', () => {
|
||||
label: "Kontobewegungen",
|
||||
labelSingle: "Kontobewegung",
|
||||
historyItemHolder: "bankStatement",
|
||||
},
|
||||
statementallocations: {
|
||||
label: "Bankzuweisungen",
|
||||
labelSingle: "Bankzuweisung"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -809,7 +813,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
} else if (supabaseData) {
|
||||
console.log(supabaseData)
|
||||
await generateHistoryItems(dataType, supabaseData[0])
|
||||
await eval( dataType + '.value.push(' + JSON.stringify(...supabaseData) + ')')
|
||||
//await eval( dataType + '.value.push(' + JSON.stringify(...supabaseData) + ')')
|
||||
toast.add({title: `${dataTypes[dataType].labelSingle} hinzugefügt`})
|
||||
if(dataTypes[dataType].redirect) await router.push(`/${dataType}/show/${supabaseData[0].id}`)
|
||||
return supabaseData
|
||||
@@ -1526,12 +1530,12 @@ export const useDataStore = defineStore('data', () => {
|
||||
return workingtimes.value.find(item => item.id === itemId)
|
||||
})
|
||||
|
||||
const getOpenDocuments = computed(() => (itemId) => {
|
||||
/*const getOpenDocuments = computed(() => (itemId) => {
|
||||
|
||||
let items = createddocuments.value.filter(i => i.type === "invoices" || i.type === "advanceInvoices")
|
||||
items = items.filter(i => bankstatements.value.filter(x => x.assignments.find(y => y.id === i.id)).length === 0)
|
||||
items = items.filter(i => bankstatements.value.filter(x => x.assignments.find(y => y.type === 'createdDocument' && y.id === i.id)).length === 0)
|
||||
|
||||
/*let finalItems = []
|
||||
/!*let finalItems = []
|
||||
items.forEach(item => {
|
||||
if(bankstatements.value.filter(i => i.assignments.find(x => x.id === item.id))){
|
||||
finalItems.push(item)
|
||||
@@ -1539,16 +1543,18 @@ export const useDataStore = defineStore('data', () => {
|
||||
|
||||
})
|
||||
|
||||
return finalItems*/
|
||||
return finalItems*!/
|
||||
|
||||
return items
|
||||
|
||||
//return createddocuments.value.filter(i => (i.type === "invoices" || i.type === "advanceInvoices") && !bankstatements.value.some(x => x.amount -))
|
||||
|
||||
})
|
||||
})*/
|
||||
const getOpenIncomingInvoices = computed(() => (itemId) => {
|
||||
|
||||
return incominginvoices.value.filter(i => !i.paid)
|
||||
return incominginvoices.value.filter(i => bankstatements.value.filter(x => x.assignments.find(y => y.type === 'incomingInvoice' && y.id === i.id)).length === 0)
|
||||
|
||||
//return incominginvoices.value.filter(i => !i.paid)
|
||||
|
||||
})
|
||||
|
||||
@@ -1726,7 +1732,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
getBankAccountById,
|
||||
getEventById,
|
||||
getWorkingTimeById,
|
||||
getOpenDocuments,
|
||||
//getOpenDocuments,
|
||||
getOpenIncomingInvoices
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user