fix the filter could not be saved after the filtered accounts, categories and transaction tags were deleted (#185)

This commit is contained in:
MaysWind
2025-07-30 21:12:15 +08:00
parent 8fa46281e0
commit f32cc4ab04
3 changed files with 12 additions and 0 deletions
@@ -120,6 +120,10 @@ export function useAccountFilterSettingPageBase(type?: string) {
const account = accountsStore.allAccountsMap[accountId];
if (!account) {
continue;
}
if (!allowHiddenAccount.value && account.hidden) {
continue;
}
@@ -135,6 +135,10 @@ export function useCategoryFilterSettingPageBase(type?: string, allowCategoryTyp
const category = transactionCategoriesStore.allTransactionCategoriesMap[categoryId];
if (!category) {
continue;
}
if (!isCategoryOrSubCategoriesAllChecked(category, filterCategoryIds.value)) {
filteredCategoryIds[categoryId] = true;
isAllSelected = false;
@@ -98,6 +98,10 @@ export function useTransactionTagFilterSettingPageBase(type?: string) {
const transactionTag = transactionTagsStore.allTransactionTagsMap[transactionTagId];
if (!transactionTag) {
continue;
}
if (filterTagIds.value[transactionTag.id]) {
filteredTagIds[transactionTag.id] = true;
} else {