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

@@ -17,7 +17,7 @@ DEFAULT_CATEGORIES = [
("Food & Delivery", "utensils", "uber eats,rappi,mcdonalds,subway,pizza,restaurant,soda,cafe,coyote ugly,el rodeo,steak house"),
("Utilities", "zap", "c.n.f.l,cnfl,ice,aya,claro cr telecomunicaciones"),
("Transportation", "car", "gasolina,gasolinera,uber rides,didi,parqueo,parking,peaje,estacion de servicio,estac.de serv"),
("Shopping", "shopping-bag", "amazon,ebay,ticotek,construplaza,epa,novex,novedades chayfer,total imports,tiendalaliga,gnc live well"),
("Shopping", "shopping-bag", "amazon,ebay,construplaza,epa,novex,novedades chayfer,total imports,tiendalaliga,gnc live well"),
("Entertainment", "film", "netflix,disney,cine,steam,playstation,blizzard,diablo"),
("Health", "heart-pulse", "farmacia,hospital,clinica,laboratorio,optica,medicina regenerativa,neumi,doer fitness,kettlebell,lacrosse"),
("Education", "graduation-cap", "universidad,udemy,coursera,libro"),
@@ -27,6 +27,7 @@ DEFAULT_CATEGORIES = [
("Telecom", "phone", "liberty,tigo,kolbi"),
("Parking & Fees", "circle-parking", "centro comercial curridabat,debito compass,cobro administr,compass"),
("Auto", "car-front", "auto lavado,lavado"),
("Electronics", "cpu", "extremetechcr,extreme tech,ticotek,ishop,gollo,radioshack"),
("Lab & Medical", "microscope", "laboratorio echandi"),
("Other", "tag", ""),
]

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>
);