code refactor

This commit is contained in:
MaysWind
2025-06-09 23:32:19 +08:00
parent cd37e2ab1d
commit 4111eb0838
27 changed files with 73 additions and 56 deletions
@@ -7,7 +7,7 @@ import { useUserStore } from '@/stores/user.ts';
import { type TransactionStatisticsFilter, useStatisticsStore } from '@/stores/statistics.ts';
import type { TypeAndDisplayName } from '@/core/base.ts';
import { type LocalizedDateRange, DateRangeScene, DateRange } from '@/core/datetime.ts';
import { type LocalizedDateRange, type WeekDayValue, DateRangeScene, DateRange } from '@/core/datetime.ts';
import { StatisticsAnalysisType, ChartDataType, ChartSortingType, ChartDateAggregationType } from '@/core/statistics.ts';
import type { TransactionCategoricalAnalysisData, TransactionTrendsAnalysisData } from '@/models/transaction.ts';
@@ -36,7 +36,7 @@ export function useStatisticsTransactionPageBase() {
const showAccountBalance = computed<boolean>(() => settingsStore.appSettings.showAccountBalance);
const defaultCurrency = computed<string>(() => userStore.currentUserDefaultCurrency);
const firstDayOfWeek = computed<number>(() => userStore.currentUserFirstDayOfWeek);
const firstDayOfWeek = computed<WeekDayValue>(() => userStore.currentUserFirstDayOfWeek);
const fiscalYearStart = computed<number>(() => userStore.currentUserFiscalYearStart);
const allDateRanges = computed<LocalizedDateRange[]>(() => {