Add Electronics category and fix DEPOSITO shown as expense
All checks were successful
Deploy to VPS / deploy (push) Successful in 24s

DEPOSITO transactions (salaries) were displaying with negative sign and
red styling. Flipped logic so only COMPRA is negative; DEPOSITO and
DEVOLUCION both show as positive income.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Carlos Escalante
2026-03-30 10:49:22 -06:00
parent eccfd53e0b
commit fe8d0144eb
2 changed files with 10 additions and 9 deletions

View File

@@ -43,15 +43,15 @@ export function getTransactionColumns({
<div
className={cn(
'w-6 h-6 rounded flex items-center justify-center shrink-0',
tx.transaction_type === 'DEVOLUCION'
? 'bg-primary/10 text-primary'
: 'bg-destructive/10 text-destructive',
tx.transaction_type === 'COMPRA'
? 'bg-destructive/10 text-destructive'
: 'bg-primary/10 text-primary',
)}
>
{tx.transaction_type === 'DEVOLUCION' ? (
<TrendingUp className="w-3 h-3" />
) : (
{tx.transaction_type === 'COMPRA' ? (
<TrendingDown className="w-3 h-3" />
) : (
<TrendingUp className="w-3 h-3" />
)}
</div>
<span className="truncate">{tx.merchant}</span>
@@ -90,10 +90,10 @@ export function getTransactionColumns({
<span
className={cn(
'font-mono font-medium',
tx.transaction_type === 'DEVOLUCION' && 'text-primary',
tx.transaction_type !== 'COMPRA' && 'text-primary',
)}
>
{tx.transaction_type === 'DEVOLUCION' ? '+' : '-'}
{tx.transaction_type === 'COMPRA' ? '-' : '+'}
{formatAmount(tx.amount, tx.currency)}
</span>
);