mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-05-19 07:28:47 +02:00
Exclude income transactions from budget transactions list
All checks were successful
Deploy to VPS / deploy (push) Successful in 16s
All checks were successful
Deploy to VPS / deploy (push) Successful in 16s
Salary/deposit transactions were showing in the "Efectivo y Transferencias" tab on the Budget page with a negative sign, which is confusing since that view is for expenses only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,9 @@ export default function Budget() {
|
||||
}
|
||||
|
||||
const { data } = await api.get<Transaction[]>('/transactions/', { params });
|
||||
setTransactions(data);
|
||||
const INCOME_TYPES = ['DEPOSITO', 'SALARY'];
|
||||
const filtered = data.filter((tx) => !INCOME_TYPES.includes(tx.transaction_type));
|
||||
setTransactions(filtered);
|
||||
} finally {
|
||||
setTxLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user