Dashboard-Ladezeit durch geteilte Datenabfragen optimiert
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
} from "~/composables/useDepreciation"
|
||||
|
||||
const loading = ref(true)
|
||||
const { loadCoreData } = useDashboardData()
|
||||
const summary = ref({
|
||||
label: "",
|
||||
income: 0,
|
||||
@@ -47,11 +48,11 @@ const loadSummary = async () => {
|
||||
end: dayjs().endOf("month")
|
||||
}
|
||||
|
||||
const [docs, incoming, allocations] = await Promise.all([
|
||||
useEntities("createddocuments").select(),
|
||||
useEntities("incominginvoices").select(),
|
||||
const [coreData, allocations] = await Promise.all([
|
||||
loadCoreData(),
|
||||
useEntities("statementallocations").select("*, bankstatement(*)")
|
||||
])
|
||||
const { createdDocuments: docs, incomingInvoices: incoming } = coreData
|
||||
|
||||
const outputDocs = (docs || []).filter((doc: any) => {
|
||||
if (!isRelevantOutputDocument(doc)) {
|
||||
|
||||
Reference in New Issue
Block a user