migrate desktop home page to composition API and typescript

This commit is contained in:
MaysWind
2025-01-19 00:42:15 +08:00
parent 965be837a3
commit 9f2bbe527e
6 changed files with 284 additions and 222 deletions
+38 -4
View File
@@ -128,14 +128,40 @@ export interface TransactionStatisticTrendsRequest extends YearMonthRangeRequest
}
export const ALL_TRANSACTION_AMOUNTS_REQUEST_TYPE = [
'today', 'thisWeek', 'thisMonth', 'thisYear', 'lastMonth',
'monthBeforeLastMonth', 'monthBeforeLast2Months', 'monthBeforeLast3Months',
'monthBeforeLast4Months', 'monthBeforeLast5Months', 'monthBeforeLast6Months',
'monthBeforeLast7Months', 'monthBeforeLast8Months', 'monthBeforeLast9Months', 'monthBeforeLast10Months'
'today',
'thisWeek',
'thisMonth',
'thisYear',
'lastMonth',
'monthBeforeLastMonth',
'monthBeforeLast2Months',
'monthBeforeLast3Months',
'monthBeforeLast4Months',
'monthBeforeLast5Months',
'monthBeforeLast6Months',
'monthBeforeLast7Months',
'monthBeforeLast8Months',
'monthBeforeLast9Months',
'monthBeforeLast10Months'
] as const;
export type TransactionAmountsRequestType = typeof ALL_TRANSACTION_AMOUNTS_REQUEST_TYPE[number];
export const LATEST_12MONTHS_TRANSACTION_AMOUNTS_REQUEST_TYPES: TransactionAmountsRequestType[] = [
'monthBeforeLast10Months',
'monthBeforeLast9Months',
'monthBeforeLast8Months',
'monthBeforeLast7Months',
'monthBeforeLast6Months',
'monthBeforeLast5Months',
'monthBeforeLast4Months',
'monthBeforeLast3Months',
'monthBeforeLast2Months',
'monthBeforeLastMonth',
'lastMonth',
'thisMonth'
];
export interface TransactionAmountsRequestParams extends PartialRecord<TransactionAmountsRequestType, StartEndTime> {
readonly useTransactionTimezone: boolean;
today?: StartEndTime;
@@ -226,6 +252,14 @@ export interface TransactionAmountsResponseItemAmountInfo {
export type TransactionOverviewResponse = PartialRecord<TransactionAmountsRequestType, TransactionOverviewResponseItem>;
export type TransactionOverviewDisplayTime = PartialRecord<TransactionAmountsRequestType, TransactionOverviewDisplayTimeItem>;
export interface TransactionOverviewDisplayTimeItem {
readonly displayTime?: string;
readonly startTime?: string;
readonly endTime?: string;
}
export interface TransactionOverviewResponseItem {
readonly valid: boolean;
readonly incomeAmount: number;