Fix: ensure financial values are visible and robust in Portal

This commit is contained in:
Sidney 2026-05-14 14:40:13 -03:00
parent e5e3c5e751
commit 5bc102dbc9
1 changed files with 5 additions and 7 deletions

View File

@ -179,10 +179,8 @@ export default function Financeiro() {
} }
// If we have a boleto and it is overdue or paid, use current Asaas value // If we have a boleto and it is overdue or paid, use current Asaas value
if (boleto && (boleto as any).valor) { if ((status === 'overdue' || status === 'paid') && (boleto as any).valor) {
const bValue = Number((boleto as any).valor); return Number((boleto as any).valor);
if (status === 'overdue' || status === 'paid') {
return bValue;
} }
} }
@ -346,13 +344,13 @@ export default function Financeiro() {
fontWeight: 600, fontWeight: 600,
color: normalizeStatus(payment) === 'overdue' ? 'var(--color-danger)' : 'var(--color-primary-light)' color: normalizeStatus(payment) === 'overdue' ? 'var(--color-danger)' : 'var(--color-primary-light)'
}}> }}>
<div style={{ display: 'flex', flexDirection: 'column' }}> <div style={{ display: 'flex', flexDirection: 'column', minHeight: '1.5rem' }}>
<span style={{ color: normalizeStatus(payment) === 'paid' ? 'var(--color-success)' : 'inherit' }}> <span style={{ color: normalizeStatus(payment) === 'paid' ? 'var(--color-success)' : 'inherit' }}>
{formatCurrency(getEffectiveValue(payment))} {formatCurrency(getEffectiveValue(payment))}
</span> </span>
{normalizeStatus(payment) === 'paid' && ( {normalizeStatus(payment) === 'paid' && (
<span style={{ fontSize: '0.65rem', color: 'var(--color-success)', fontWeight: 700, marginTop: -2 }}> <span style={{ fontSize: '0.65rem', color: 'var(--color-success)', fontWeight: 800, marginTop: '-2px', textTransform: 'uppercase' }}>
PAGO Pago
</span> </span>
)} )}
</div> </div>