fix cannot shift the date range in the trend analysis after switching from categorical analysis with the date range set to All

This commit is contained in:
MaysWind
2025-10-27 01:00:59 +08:00
parent 5cb7eca340
commit 5faf3bfe66
2 changed files with 8 additions and 8 deletions
@@ -909,13 +909,13 @@ function setCustomDateFilter(startTime: number | TextualYearMonth, endTime: numb
}
function shiftDateRange(scale: number): void {
let changed = false;
if (analysisType.value === StatisticsAnalysisType.CategoricalAnalysis) {
if (query.value.categoricalChartDateType === DateRange.All.type) {
return;
}
let changed = false;
if (analysisType.value === StatisticsAnalysisType.CategoricalAnalysis) {
const newDateRange = getShiftedDateRangeAndDateType(query.value.categoricalChartStartTime, query.value.categoricalChartEndTime, scale, firstDayOfWeek.value, fiscalYearStart.value, DateRangeScene.Normal);
changed = statisticsStore.updateTransactionStatisticsFilter({
@@ -682,13 +682,13 @@ function setCustomDateFilter(startTime: number | TextualYearMonth, endTime: numb
}
function shiftDateRange(scale: number): void {
let changed = false;
if (analysisType.value === StatisticsAnalysisType.CategoricalAnalysis) {
if (query.value.categoricalChartDateType === DateRange.All.type) {
return;
}
let changed = false;
if (analysisType.value === StatisticsAnalysisType.CategoricalAnalysis) {
const newDateRange = getShiftedDateRangeAndDateType(query.value.categoricalChartStartTime, query.value.categoricalChartEndTime, scale, firstDayOfWeek.value, fiscalYearStart.value, DateRangeScene.Normal);
changed = statisticsStore.updateTransactionStatisticsFilter({