diff --git a/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue b/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue index 8c9391a3b4..500dce25f9 100644 --- a/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue @@ -258,6 +258,10 @@ const relativeToCurrentListRange = computed(() => { { label: t('v_query.year_to_date'), value: 'yearBeginning' + }, + { + label: t('common.month_to_yesterday'), + value: 'monthToYesterday' } ] break diff --git a/core/core-frontend/src/custom-component/v-query/FilterTime.vue b/core/core-frontend/src/custom-component/v-query/FilterTime.vue index d4f8768743..da52e556be 100644 --- a/core/core-frontend/src/custom-component/v-query/FilterTime.vue +++ b/core/core-frontend/src/custom-component/v-query/FilterTime.vue @@ -242,6 +242,10 @@ const relativeToCurrentListRange = computed(() => { { label: t('v_query.year_to_date'), value: 'yearBeginning' + }, + { + label: t('common.month_to_yesterday'), + value: 'monthToYesterday' } ] break diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index ef3ac9d7a9..efb807228b 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -2194,6 +2194,10 @@ const relativeToCurrentListRange = computed(() => { { label: t('v_query.year_to_date'), value: 'yearBeginning' + }, + { + label: t('common.month_to_yesterday'), + value: 'monthToYesterday' } ] break diff --git a/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue b/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue index c641620919..817a3a757b 100644 --- a/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue +++ b/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue @@ -253,6 +253,10 @@ const relativeToCurrentListRange = computed(() => { { label: t('v_query.year_to_date'), value: 'yearBeginning' + }, + { + label: t('common.month_to_yesterday'), + value: 'monthToYesterday' } ] break diff --git a/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts b/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts index 68fc493bef..a0c60ff2a8 100644 --- a/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts +++ b/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts @@ -70,6 +70,8 @@ function getCustomRange(relativeToCurrentRange: string): [Date, Date] { ] case 'YearToThisMonth': return [new Date(dayjs().startOf('year').format('YYYY/MM/DD HH:mm:ss')), getThisEnd('month')] + case 'monthToYesterday': + return [new Date(dayjs().startOf('month').format('YYYY/MM/DD HH:mm:ss')), getLastEnd('day')] case 'today': return [getThisStart('day'), getThisEnd('day')] case 'yesterday': diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index 473b8c111c..3e24c47a18 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -1,5 +1,6 @@ export default { common: { + month_to_yesterday: 'From the beginning of the month to yesterday', to_this_month: 'From the beginning of the year to this month', up_to_options: 'Display up to 1000 options', next_week: 'Next week', diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index c8440b6283..5d5f6066f8 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -1,5 +1,6 @@ export default { common: { + month_to_yesterday: '月初至昨天', to_this_month: '年初至本月', up_to_options: '最多展示1000個選項', next_week: '下週', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 01c9d3313e..2c38bd7c2e 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -1,5 +1,6 @@ export default { common: { + month_to_yesterday: '月初至昨天', to_this_month: '年初至本月', up_to_options: '最多展示1000个选项', next_week: '下周',