fix: filters for tx list

This commit is contained in:
vas3k
2025-05-21 12:57:01 +02:00
parent f5c5bf75f6
commit 16b9eb4ce1
2 changed files with 32 additions and 1 deletions

View File

@@ -124,6 +124,30 @@ export const standardFieldRenderers: Record<string, FieldRenderer> = {
)
},
},
convertedTotal: {
name: "Converted Total",
code: "convertedTotal",
classes: "text-right",
sortable: true,
formatValue: (transaction: Transaction) => (
<div
className={cn(
{ income: "text-green-500", expense: "text-red-500", other: "text-black" }[transaction.type || "other"],
"flex flex-col justify-end text-right text-lg"
)}
>
{transaction.convertedTotal && transaction.convertedCurrencyCode
? formatCurrency(transaction.convertedTotal, transaction.convertedCurrencyCode)
: transaction.convertedTotal}
</div>
),
},
currencyCode: {
name: "Currency",
code: "currencyCode",
classes: "text-right",
sortable: true,
},
}
const getFieldRenderer = (field: Field): FieldRenderer => {