Dashboard-Ladezeit durch geteilte Datenabfragen optimiert

This commit is contained in:
2026-08-07 19:07:20 +02:00
parent d2e0b4ca0f
commit 9421c3221c
5 changed files with 69 additions and 18 deletions

View File

@@ -13,6 +13,7 @@ import {
dayjs.extend(customParseFormat)
const auth = useAuthStore()
const { loadCoreData } = useDashboardData()
const loading = ref(true)
const summary = ref({
@@ -39,10 +40,7 @@ const loadSummary = async () => {
const periodType = normalizeTaxEvaluationPeriod(auth.activeTenantData?.taxEvaluationPeriod)
const bounds = getTaxEvaluationPeriodBounds(dayjs(), periodType)
const [docs, incoming] = await Promise.all([
useEntities("createddocuments").select(),
useEntities("incominginvoices").select()
])
const { createdDocuments: docs, incomingInvoices: incoming } = await loadCoreData()
const outputDocs = (docs || []).filter((doc: any) => {
if (doc?.state !== "Gebucht") return false