Added payment date to expenses table

This commit is contained in:
Jose Selesan
2026-05-29 14:37:16 -03:00
parent b1968cece9
commit e99e97aa14

View File

@@ -84,6 +84,27 @@ export function ExpensesTable({ data, onPay, page, total, pageSize, onPageChange
); );
}, },
}, },
{
header: "Fecha de pago",
accessorKey: "paymentDate",
cell: ({ row }) => {
const paymentDate = row.getValue("paymentDate");
if (!paymentDate) {
return <span className="text-muted-foreground">--</span>;
}
const date = new Date(paymentDate as string);
return (
<span className="text-muted-foreground">
{date.toLocaleDateString("es-AR", {
timeZone: "UTC",
day: "2-digit",
month: "2-digit",
year: "numeric",
})}
</span>
);
},
},
{ {
id: "actions", id: "actions",
cell: ({ row }) => { cell: ({ row }) => {