hide unsupported filters when selecting Account Total Assets or Account Total Liabilities on the Statistics & Analysis page

This commit is contained in:
MaysWind
2025-10-18 00:38:48 +08:00
parent 8a947ef224
commit 60b6ed51cd
3 changed files with 49 additions and 10 deletions
@@ -156,6 +156,30 @@ export function useStatisticsTransactionPageBase() {
}
});
const canUseCategoryFilter = computed<boolean>(() => {
if (query.value.chartDataType === ChartDataType.AccountTotalAssets.type || query.value.chartDataType === ChartDataType.AccountTotalLiabilities.type) {
return false;
}
return true;
});
const canUseTagFilter = computed<boolean>(() => {
if (query.value.chartDataType === ChartDataType.AccountTotalAssets.type || query.value.chartDataType === ChartDataType.AccountTotalLiabilities.type) {
return false;
}
return true;
});
const canUseKeywordFilter = computed<boolean>(() => {
if (query.value.chartDataType === ChartDataType.AccountTotalAssets.type || query.value.chartDataType === ChartDataType.AccountTotalLiabilities.type) {
return false;
}
return true;
});
const showAmountInChart = computed<boolean>(() => {
if (!showAccountBalance.value
&& (query.value.chartDataType === ChartDataType.AccountTotalAssets.type || query.value.chartDataType === ChartDataType.AccountTotalLiabilities.type)) {
@@ -259,6 +283,9 @@ export function useStatisticsTransactionPageBase() {
queryTrendDateAggregationTypeName,
isQueryDateRangeChanged,
canShiftDateRange,
canUseCategoryFilter,
canUseTagFilter,
canUseKeywordFilter,
showAmountInChart,
totalAmountName,
showTotalAmountInTrendsChart,