mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
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:
@@ -909,13 +909,13 @@ function setCustomDateFilter(startTime: number | TextualYearMonth, endTime: numb
|
|||||||
}
|
}
|
||||||
|
|
||||||
function shiftDateRange(scale: number): void {
|
function shiftDateRange(scale: number): void {
|
||||||
if (query.value.categoricalChartDateType === DateRange.All.type) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let changed = false;
|
let changed = false;
|
||||||
|
|
||||||
if (analysisType.value === StatisticsAnalysisType.CategoricalAnalysis) {
|
if (analysisType.value === StatisticsAnalysisType.CategoricalAnalysis) {
|
||||||
|
if (query.value.categoricalChartDateType === DateRange.All.type) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const newDateRange = getShiftedDateRangeAndDateType(query.value.categoricalChartStartTime, query.value.categoricalChartEndTime, scale, firstDayOfWeek.value, fiscalYearStart.value, DateRangeScene.Normal);
|
const newDateRange = getShiftedDateRangeAndDateType(query.value.categoricalChartStartTime, query.value.categoricalChartEndTime, scale, firstDayOfWeek.value, fiscalYearStart.value, DateRangeScene.Normal);
|
||||||
|
|
||||||
changed = statisticsStore.updateTransactionStatisticsFilter({
|
changed = statisticsStore.updateTransactionStatisticsFilter({
|
||||||
|
|||||||
@@ -682,13 +682,13 @@ function setCustomDateFilter(startTime: number | TextualYearMonth, endTime: numb
|
|||||||
}
|
}
|
||||||
|
|
||||||
function shiftDateRange(scale: number): void {
|
function shiftDateRange(scale: number): void {
|
||||||
if (query.value.categoricalChartDateType === DateRange.All.type) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let changed = false;
|
let changed = false;
|
||||||
|
|
||||||
if (analysisType.value === StatisticsAnalysisType.CategoricalAnalysis) {
|
if (analysisType.value === StatisticsAnalysisType.CategoricalAnalysis) {
|
||||||
|
if (query.value.categoricalChartDateType === DateRange.All.type) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const newDateRange = getShiftedDateRangeAndDateType(query.value.categoricalChartStartTime, query.value.categoricalChartEndTime, scale, firstDayOfWeek.value, fiscalYearStart.value, DateRangeScene.Normal);
|
const newDateRange = getShiftedDateRangeAndDateType(query.value.categoricalChartStartTime, query.value.categoricalChartEndTime, scale, firstDayOfWeek.value, fiscalYearStart.value, DateRangeScene.Normal);
|
||||||
|
|
||||||
changed = statisticsStore.updateTransactionStatisticsFilter({
|
changed = statisticsStore.updateTransactionStatisticsFilter({
|
||||||
|
|||||||
Reference in New Issue
Block a user