update url address when changing the settings on the statistics analysis page

This commit is contained in:
MaysWind
2024-07-14 19:55:14 +08:00
parent 2cbcc40ca9
commit 7849b2f05c
9 changed files with 558 additions and 269 deletions
+22
View File
@@ -304,6 +304,27 @@ const allDateRanges = {
}
};
const allDateRangesMap = {
[allDateRanges.All.type]: allDateRanges.All,
[allDateRanges.Today.type]: allDateRanges.Today,
[allDateRanges.Yesterday.type]: allDateRanges.Yesterday,
[allDateRanges.LastSevenDays.type]: allDateRanges.LastSevenDays,
[allDateRanges.LastThirtyDays.type]: allDateRanges.LastThirtyDays,
[allDateRanges.ThisWeek.type]: allDateRanges.ThisWeek,
[allDateRanges.LastWeek.type]: allDateRanges.LastWeek,
[allDateRanges.ThisMonth.type]: allDateRanges.ThisMonth,
[allDateRanges.LastMonth.type]: allDateRanges.LastMonth,
[allDateRanges.ThisYear.type]: allDateRanges.ThisYear,
[allDateRanges.LastYear.type]: allDateRanges.LastYear,
[allDateRanges.RecentTwelveMonths.type]: allDateRanges.RecentTwelveMonths,
[allDateRanges.RecentTwentyFourMonths.type]: allDateRanges.RecentTwentyFourMonths,
[allDateRanges.RecentThirtySixMonths.type]: allDateRanges.RecentThirtySixMonths,
[allDateRanges.RecentTwoYears.type]: allDateRanges.RecentTwoYears,
[allDateRanges.RecentThreeYears.type]: allDateRanges.RecentThreeYears,
[allDateRanges.RecentFiveYears.type]: allDateRanges.RecentFiveYears,
[allDateRanges.Custom.type]: allDateRanges.Custom
};
const defaultFirstDayOfWeek = allWeekDays.Sunday.type;
const defaultLongDateFormat = allLongDateFormat.YYYYMMDD;
const defaultShortDateFormat = allShortDateFormat.YYYYMMDD;
@@ -327,6 +348,7 @@ export default {
allShortTimeFormatArray: allShortTimeFormatArray,
allDateRangeScenes: allDateRangeScenes,
allDateRanges: allDateRanges,
allDateRangesMap: allDateRangesMap,
defaultFirstDayOfWeek: defaultFirstDayOfWeek,
defaultLongDateFormat: defaultLongDateFormat,
defaultShortDateFormat: defaultShortDateFormat,
+15
View File
@@ -127,6 +127,20 @@ const allChartDataTypes = {
}
};
const allChartDataTypesMap = {
[allChartDataTypes.ExpenseByAccount.type]: allChartDataTypes.ExpenseByAccount,
[allChartDataTypes.ExpenseByPrimaryCategory.type]: allChartDataTypes.ExpenseByPrimaryCategory,
[allChartDataTypes.ExpenseBySecondaryCategory.type]: allChartDataTypes.ExpenseBySecondaryCategory,
[allChartDataTypes.IncomeByAccount.type]: allChartDataTypes.IncomeByAccount,
[allChartDataTypes.IncomeByPrimaryCategory.type]: allChartDataTypes.IncomeByPrimaryCategory,
[allChartDataTypes.IncomeBySecondaryCategory.type]: allChartDataTypes.IncomeBySecondaryCategory,
[allChartDataTypes.AccountTotalAssets.type]: allChartDataTypes.AccountTotalAssets,
[allChartDataTypes.AccountTotalLiabilities.type]: allChartDataTypes.AccountTotalLiabilities,
[allChartDataTypes.TotalExpense.type]: allChartDataTypes.TotalExpense,
[allChartDataTypes.TotalIncome.type]: allChartDataTypes.TotalIncome,
[allChartDataTypes.TotalBalance.type]: allChartDataTypes.TotalBalance
};
const defaultChartDataType = allChartDataTypes.ExpenseByPrimaryCategory.type;
const allSortingTypes = {
@@ -164,6 +178,7 @@ export default {
allTrendChartTypesArray: allTrendChartTypesArray,
defaultTrendChartType: defaultTrendChartType,
allChartDataTypes: allChartDataTypes,
allChartDataTypesMap: allChartDataTypesMap,
defaultChartDataType: defaultChartDataType,
defaultCategoricalChartDataRangeType: datetime.allDateRanges.ThisMonth.type,
defaultTrendChartDataRangeType: datetime.allDateRanges.ThisYear.type,