feat(expenses): add beloPrice and usdcEquivalent fields to Expense model and update related logic

This commit is contained in:
Jose Selesan
2026-06-08 21:13:03 -03:00
parent b08399908b
commit 142fd4e33f
6 changed files with 398 additions and 2 deletions

View File

@@ -97,6 +97,25 @@ export function ExpensesTable({
);
},
},
{
header: "USDC",
accessorKey: "usdcEquivalent",
cell: ({ row }) => {
const value = row.getValue("usdcEquivalent");
if (!value) {
return <span className="text-muted-foreground">--</span>;
}
return (
<span className="tabular-nums">
{Number(value).toLocaleString("es-AR", {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}{" "}
USDC
</span>
);
},
},
{
header: "Vencimiento",
accessorKey: "dueDate",
@@ -232,6 +251,15 @@ export function ExpensesTable({
? `Pagado ${formatExpenseDate(expense.paymentDate)}`
: "Sin fecha de pago"}
</p>
{expense.usdcEquivalent && (
<p className="text-xs text-muted-foreground tabular-nums">
{Number(expense.usdcEquivalent).toLocaleString("es-AR", {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}{" "}
USDC
</p>
)}
</div>
<div className="flex gap-1">