diff --git a/src/views/desktop/transactions/ListPage.vue b/src/views/desktop/transactions/ListPage.vue index c8f76e83..2d2983f8 100644 --- a/src/views/desktop/transactions/ListPage.vue +++ b/src/views/desktop/transactions/ListPage.vue @@ -146,7 +146,8 @@ + :append-icon="(query.categoryIds && queryAllFilterCategoryIdsCount > 1 ? icons.check : null)" + v-if="allAvailableCategoriesCount > 0">
@@ -158,7 +159,7 @@ - + @@ -313,6 +316,7 @@ class="no-margin-vertical" :key="categoryType" v-for="(categories, categoryType) in allPrimaryCategories" + v-show="categories && categories.length" > - + @@ -657,6 +664,9 @@ export default { allAccounts() { return this.accountsStore.allAccountsMap; }, + allAvailableAccountsCount() { + return this.accountsStore.allAvailableAccountsCount; + }, allCategories() { return this.transactionCategoriesStore.allTransactionCategoriesMap; }, @@ -677,6 +687,25 @@ export default { return primaryCategories; }, + allAvailableCategoriesCount() { + let totalCount = 0; + + for (const categoryType in this.transactionCategoriesStore.allTransactionCategories) { + if (!Object.prototype.hasOwnProperty.call(this.transactionCategoriesStore.allTransactionCategories, categoryType)) { + continue; + } + + if (this.query.type && this.getTransactionTypeFromCategoryType(categoryType) !== this.query.type) { + continue; + } + + if (this.transactionCategoriesStore.allTransactionCategories[categoryType]) { + totalCount += this.transactionCategoriesStore.allTransactionCategories[categoryType].length; + } + } + + return totalCount; + }, allTransactionTags() { return this.transactionTagsStore.allTransactionTagsMap; },