add billing cycle date range filter

This commit is contained in:
MaysWind
2024-12-16 23:44:20 +08:00
parent 8fdbb39ee4
commit 647cd3c33f
12 changed files with 226 additions and 23 deletions
+24 -1
View File
@@ -252,6 +252,22 @@ const allDateRanges = {
[allDateRangeScenes.TrendAnalysis]: true
}
},
PreviousBillingCycle: {
type: 51,
name: 'Previous Billing Cycle',
isBillingCycle: true,
availableScenes: {
[allDateRangeScenes.Normal]: true
}
},
CurrentBillingCycle: {
type: 52,
name: 'Current Billing Cycle',
isBillingCycle: true,
availableScenes: {
[allDateRangeScenes.Normal]: true
}
},
RecentTwelveMonths: {
type: 101,
name: 'Recent 12 months',
@@ -316,7 +332,8 @@ const allDateRangesMap = {
[allDateRanges.LastMonth.type]: allDateRanges.LastMonth,
[allDateRanges.ThisYear.type]: allDateRanges.ThisYear,
[allDateRanges.LastYear.type]: allDateRanges.LastYear,
[allDateRanges.RecentTwelveMonths.type]: allDateRanges.RecentTwelveMonths,
[allDateRanges.PreviousBillingCycle.type]: allDateRanges.PreviousBillingCycle,
[allDateRanges.CurrentBillingCycle.type]: allDateRanges.CurrentBillingCycle,
[allDateRanges.RecentTwentyFourMonths.type]: allDateRanges.RecentTwentyFourMonths,
[allDateRanges.RecentThirtySixMonths.type]: allDateRanges.RecentThirtySixMonths,
[allDateRanges.RecentTwoYears.type]: allDateRanges.RecentTwoYears,
@@ -325,6 +342,11 @@ const allDateRangesMap = {
[allDateRanges.Custom.type]: allDateRanges.Custom
};
const allBillingCycleDateRangesMap = {
[allDateRanges.PreviousBillingCycle.type]: allDateRanges.PreviousBillingCycle,
[allDateRanges.CurrentBillingCycle.type]: allDateRanges.CurrentBillingCycle
};
const defaultFirstDayOfWeek = allWeekDays.Sunday.type;
const defaultLongDateFormat = allLongDateFormat.YYYYMMDD;
const defaultShortDateFormat = allShortDateFormat.YYYYMMDD;
@@ -349,6 +371,7 @@ export default {
allDateRangeScenes: allDateRangeScenes,
allDateRanges: allDateRanges,
allDateRangesMap: allDateRangesMap,
allBillingCycleDateRangesMap: allBillingCycleDateRangesMap,
defaultFirstDayOfWeek: defaultFirstDayOfWeek,
defaultLongDateFormat: defaultLongDateFormat,
defaultShortDateFormat: defaultShortDateFormat,