Add showing last digits for expense income payment and transfer pages
This commit is contained in:
parent
d328311ed6
commit
4cbe3fe0f9
|
@ -259,6 +259,9 @@
|
|||
<div class="text-sm text-gray-600">
|
||||
<span class="font-bold">Card:</span>
|
||||
{getCardName(expense.card_id)}
|
||||
<span class="text-sm"
|
||||
>{`•${cards.find((card) => card.id == expense.card_id)?.last_digits}`}</span
|
||||
>
|
||||
<span class="font-bold">Type:</span>
|
||||
<span style="color: {getTypeColor(expense.type_id)};"
|
||||
>{getTypeName(expense.type_id)}</span
|
||||
|
|
|
@ -221,6 +221,9 @@
|
|||
<div class="text-sm text-gray-600">
|
||||
<span class="font-bold">Card:</span>
|
||||
{getCardName(income.card_id)}
|
||||
<span class="text-sm"
|
||||
>{`•${cards.find((card) => card.id == income.card_id)?.last_digits}`}</span
|
||||
>
|
||||
<span class="font-bold">Date:</span>
|
||||
{income.date}
|
||||
</div>
|
||||
|
|
|
@ -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<number, = new Map();
|
||||
function createHandler(item: ItemBought) {
|
||||
|
@ -470,9 +465,12 @@
|
|||
<p>{payment.descr}</p>
|
||||
<div class="text-sm text-gray-600">
|
||||
<span class="font-bold">Card:</span>
|
||||
{payment.card_id}
|
||||
{getCardName(payment.card_id || 0)}
|
||||
<span class="text-sm"
|
||||
>{`•${cards.find((card) => card.id == payment.card_id)?.last_digits}`}</span
|
||||
>
|
||||
<span class="font-bold">Category:</span>
|
||||
{payment.category_id}
|
||||
{categories.find(cat => cat.id == payment.category_id)?.name}
|
||||
<span class="font-bold">Date:</span>
|
||||
{payment.date}
|
||||
</div>
|
||||
|
|
|
@ -222,8 +222,14 @@
|
|||
<div class="text-sm text-gray-600">
|
||||
<span class="font-bold">From:</span>
|
||||
{getCardName(transfer.from_card_id)}
|
||||
<span class="text-sm"
|
||||
>{`•${cards.find((card) => card.id == transfer.from_card_id)?.last_digits}`}</span
|
||||
>
|
||||
<span class="font-bold">To:</span>
|
||||
{getCardName(transfer.to_card_id)}
|
||||
<span class="text-sm"
|
||||
>{`•${cards.find((card) => card.id == transfer.to_card_id)?.last_digits}`}</span
|
||||
>
|
||||
<span class="font-bold">Date:</span>
|
||||
{transfer.date}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user