diff --git a/src/routes/expense/+page.svelte b/src/routes/expense/+page.svelte index 93079b7..cd46c56 100644 --- a/src/routes/expense/+page.svelte +++ b/src/routes/expense/+page.svelte @@ -259,6 +259,9 @@
Card: {getCardName(expense.card_id)} + {`•${cards.find((card) => card.id == expense.card_id)?.last_digits}`} Type: {getTypeName(expense.type_id)} Card: {getCardName(income.card_id)} + {`•${cards.find((card) => card.id == income.card_id)?.last_digits}`} Date: {income.date}
diff --git a/src/routes/payment/+page.svelte b/src/routes/payment/+page.svelte index 65a0323..8bdf7ca 100644 --- a/src/routes/payment/+page.svelte +++ b/src/routes/payment/+page.svelte @@ -132,11 +132,6 @@ const type = types.find((type) => type.id === typeId); return type ? type.color : "#000"; } - function getTypeName(typeId: number) { - if (typeId === 0) return "None"; - const type = types.find((card) => card.id === typeId); - return type ? type.name : "Unknown"; - } // let priceRefs: Map{payment.descr}

Card: - {payment.card_id} + {getCardName(payment.card_id || 0)} + {`•${cards.find((card) => card.id == payment.card_id)?.last_digits}`} Category: - {payment.category_id} + {categories.find(cat => cat.id == payment.category_id)?.name} Date: {payment.date}
diff --git a/src/routes/transfer/+page.svelte b/src/routes/transfer/+page.svelte index 83a2ef3..2ba343e 100644 --- a/src/routes/transfer/+page.svelte +++ b/src/routes/transfer/+page.svelte @@ -222,8 +222,14 @@
From: {getCardName(transfer.from_card_id)} + {`•${cards.find((card) => card.id == transfer.from_card_id)?.last_digits}`} To: {getCardName(transfer.to_card_id)} + {`•${cards.find((card) => card.id == transfer.to_card_id)?.last_digits}`} Date: {transfer.date}