mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
add billing cycle date range filter
This commit is contained in:
+14
-2
@@ -644,7 +644,7 @@ function getAllWeekDays(firstDayOfWeek, translateFn) {
|
||||
return allWeekDays;
|
||||
}
|
||||
|
||||
function getAllDateRanges(scene, includeCustom, translateFn) {
|
||||
function getAllDateRanges(scene, includeCustom, includeBillingCycle, translateFn) {
|
||||
const allDateRanges = [];
|
||||
|
||||
for (let dateRangeField in datetimeConstants.allDateRanges) {
|
||||
@@ -658,6 +658,18 @@ function getAllDateRanges(scene, includeCustom, translateFn) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dateRangeType.isBillingCycle) {
|
||||
if (includeBillingCycle) {
|
||||
allDateRanges.push({
|
||||
type: dateRangeType.type,
|
||||
displayName: translateFn(dateRangeType.name),
|
||||
isBillingCycle: dateRangeType.isBillingCycle
|
||||
});
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (includeCustom || dateRangeType.type !== datetimeConstants.allDateRanges.Custom.type) {
|
||||
allDateRanges.push({
|
||||
type: dateRangeType.type,
|
||||
@@ -1746,7 +1758,7 @@ export function i18nFunctions(i18nGlobal) {
|
||||
getTimezoneDifferenceDisplayText: (utcOffset) => getTimezoneDifferenceDisplayText(utcOffset, i18nGlobal.t),
|
||||
getAllCurrencies: () => getAllCurrencies(i18nGlobal.t),
|
||||
getAllWeekDays: (firstDayOfWeek) => getAllWeekDays(firstDayOfWeek, i18nGlobal.t),
|
||||
getAllDateRanges: (scene, includeCustom) => getAllDateRanges(scene, includeCustom, i18nGlobal.t),
|
||||
getAllDateRanges: (scene, includeCustom, includeBillingCycle) => getAllDateRanges(scene, includeCustom, includeBillingCycle, i18nGlobal.t),
|
||||
getAllRecentMonthDateRanges: (userStore, includeAll, includeCustom) => getAllRecentMonthDateRanges(userStore, includeAll, includeCustom, i18nGlobal.t),
|
||||
getDateRangeDisplayName: (userStore, dateType, startTime, endTime) => getDateRangeDisplayName(userStore, dateType, startTime, endTime, i18nGlobal.t),
|
||||
getAllTimezoneTypesUsedForStatistics: (currentTimezone) => getAllTimezoneTypesUsedForStatistics(currentTimezone, i18nGlobal.t),
|
||||
|
||||
Reference in New Issue
Block a user