From c9d20f2475da6f4cdd4972f5f924711f7cfbac0b Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Sat, 6 Sep 2025 19:13:44 -0400 Subject: [PATCH] Fixed transaction card money style for credited accounts. --- web-app/src/components/TransactionCard.vue | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/web-app/src/components/TransactionCard.vue b/web-app/src/components/TransactionCard.vue index 833f685..0b149a8 100644 --- a/web-app/src/components/TransactionCard.vue +++ b/web-app/src/components/TransactionCard.vue @@ -5,7 +5,6 @@ import type { TransactionsListItem } from '@/api/transaction'; import { useRoute, useRouter } from 'vue-router'; import CategoryLabel from './CategoryLabel.vue'; import { computed, type Ref } from 'vue'; -import { AccountTypes } from '@/api/account'; const router = useRouter() const route = useRoute() @@ -16,15 +15,9 @@ const props = defineProps<{ tx: TransactionsListItem }>() // Defines the style to use for money based on which accounts are involved. const moneyStyle: Ref = computed(() => { if (props.tx.debitedAccount !== null && props.tx.creditedAccount === null) { - const debitedAccountType = AccountTypes.of(props.tx.debitedAccount.type) - return debitedAccountType.debitsPositive - ? "positive" - : "negative" + return "positive" } else if (props.tx.creditedAccount !== null && props.tx.debitedAccount === null) { - const creditedAccountType = AccountTypes.of(props.tx.creditedAccount.type) - return creditedAccountType.debitsPositive - ? "negative" - : "positive" + return "negative" } return "neutral" })