Fix: Calendar menu negative sign for revenue

Corrects the calendar view to display revenue transactions with positive values, removing the negative sign.
This commit is contained in:
gpt-engineer-app[bot] 2025-05-18 02:34:05 +00:00
parent 688548893d
commit eccb0a6cb6

View File

@ -131,7 +131,9 @@ const CalendarioPage = () => {
<div className="flex justify-between"> <div className="flex justify-between">
<Badge variant="outline">{transaction.categoria}</Badge> <Badge variant="outline">{transaction.categoria}</Badge>
<span className={transaction.tipo.toLowerCase() === 'entrada' ? "text-finance-green font-medium" : "text-finance-red font-medium"}> <span className={transaction.tipo.toLowerCase() === 'entrada' ? "text-finance-green font-medium" : "text-finance-red font-medium"}>
{transaction.tipo.toLowerCase() === 'entrada' ? '' : '-'}{formatCurrency(Math.abs(transaction.valor))} {transaction.tipo.toLowerCase() === 'entrada'
? formatCurrency(transaction.valor)
: `-${formatCurrency(Math.abs(transaction.valor))}`}
</span> </span>
</div> </div>
</div> </div>