mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-05-19 09:28:47 +02:00
Add DEPOSITO transaction type and Salarios page
All checks were successful
Deploy to VPS / deploy (push) Successful in 21s
All checks were successful
Deploy to VPS / deploy (push) Successful in 21s
New TransactionType.DEPOSITO for salary deposits from n8n/Gmail flow. New /salarios endpoint with summary. New top-level Salarios page with DataTable and summary cards. Push notifications link to /salarios for deposits. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ from app.models.models import (
|
||||
TransactionCreate,
|
||||
TransactionRead,
|
||||
TransactionSource,
|
||||
TransactionType,
|
||||
TransactionUpdate,
|
||||
)
|
||||
|
||||
@@ -183,11 +184,12 @@ def create_transaction(
|
||||
# Send push notification
|
||||
symbol = "₡" if tx.currency == Currency.CRC else tx.currency.value
|
||||
amount_str = f"{symbol}{tx.amount:,.0f}" if tx.currency == Currency.CRC else f"{symbol}{tx.amount:,.2f}"
|
||||
is_deposit = tx.transaction_type == TransactionType.DEPOSITO
|
||||
send_push_to_all(
|
||||
session,
|
||||
title=f"💳 {tx.merchant}",
|
||||
body=f"{amount_str} — {tx.bank.value} {tx.transaction_type.value.lower()}",
|
||||
url=f"/budget",
|
||||
title=f"{'🏦' if is_deposit else '💳'} {tx.merchant}",
|
||||
body=f"{amount_str} — {tx.bank.value} {'depósito' if is_deposit else tx.transaction_type.value.lower()}",
|
||||
url="/salarios" if is_deposit else "/budget",
|
||||
)
|
||||
|
||||
return tx
|
||||
|
||||
Reference in New Issue
Block a user