Dashboard-Ladezeit durch geteilte Datenabfragen optimiert
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user