Skip to content

Commit

Permalink
fix: correct transaction type navigation logic in EditPage.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
f97 authored Feb 6, 2025
1 parent 6ddeda5 commit 105d113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/mobile/accounts/EditPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,10 @@ watch(() => account.value.balance, (newBalance, oldBalance) => {
const amountDiff = Math.abs(diff);
const router = props.f7router;
if(diff > 0) {
if(diff < 0) {
const url = `/transaction/add?amount=${amountDiff}&type=${TransactionType.Expense.toString()}&accountId=${account.value.id}`;
router.navigate(url);
} else {
} else if(diff > 0) {
const url = `/transaction/add?amount=${amountDiff}&type=${TransactionType.Income.toString()}&accountId=${account.value.id}`;
router.navigate(url);
}
Expand Down

0 comments on commit 105d113

Please sign in to comment.