Skip to content

Commit

Permalink
fix the bug that the filter does not take effect when navigating from…
Browse files Browse the repository at this point in the history
… the account or statistics page to the transaction list page
  • Loading branch information
mayswind committed Jul 7, 2024
1 parent 7b70b2d commit dad3f10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/stores/statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,12 @@ export const useStatisticsStore = defineStore('statistics', {
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.ExpenseByAccount.type
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.AccountTotalAssets.type
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.AccountTotalLiabilities.type) {
querys.push('accountId=' + item.id);
querys.push('accountIds=' + item.id);
} else if (this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.IncomeByPrimaryCategory.type
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.IncomeBySecondaryCategory.type
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.ExpenseByPrimaryCategory.type
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.ExpenseBySecondaryCategory.type) {
querys.push('categoryId=' + item.id);
querys.push('categoryIds=' + item.id);
}

if (analysisType === statisticsConstants.allAnalysisTypes.CategoricalAnalysis
Expand Down
2 changes: 1 addition & 1 deletion src/views/desktop/accounts/ListPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
<div class="d-flex account-toolbar align-center">
<v-btn class="px-2" density="comfortable" color="default" variant="text"
:disabled="loading" :prepend-icon="icons.transactions"
:to="`/transaction/list?accountId=${accountOrSubAccountId(element)}`">
:to="`/transaction/list?accountIds=${accountOrSubAccountId(element)}`">
{{ $t('Transaction List') }}
</v-btn>
<v-btn class="px-2 ml-1" density="comfortable" color="default" variant="text"
Expand Down
4 changes: 2 additions & 2 deletions src/views/mobile/accounts/ListPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
:id="getAccountDomId(account)"
:class="{ 'has-child-list-item': account.type === allAccountTypes.MultiSubAccounts && hasVisibleSubAccount(account), 'actual-first-child': account.id === firstShowingIds.accounts[accountCategory.id], 'actual-last-child': account.id === lastShowingIds.accounts[accountCategory.id] }"
:after="accountBalance(account)"
:link="!sortable ? '/transaction/list?accountId=' + account.id : null"
:link="!sortable ? '/transaction/list?accountIds=' + account.id : null"
:key="account.id"
v-for="account in categorizedAccounts[accountCategory.id].accounts"
v-show="showHidden || !account.hidden"
Expand Down Expand Up @@ -117,7 +117,7 @@
:class="{ 'actual-first-child': subAccount.id === firstShowingIds.subAccounts[account.id], 'actual-last-child': subAccount.id === lastShowingIds.subAccounts[account.id] }"
:id="getAccountDomId(subAccount)"
:title="subAccount.name" :footer="subAccount.comment" :after="accountBalance(subAccount)"
:link="!sortable ? '/transaction/list?accountId=' + subAccount.id : null"
:link="!sortable ? '/transaction/list?accountIds=' + subAccount.id : null"
:key="subAccount.id"
v-for="subAccount in account.subAccounts"
v-show="showHidden || !subAccount.hidden"
Expand Down

0 comments on commit dad3f10

Please sign in to comment.