feat: #44 fatura de cartão com data futura fica pendente até confirmação
- Nova tabela pending_bill_imports (migration 016) - ImportHandler.Confirm: quando is_credit_card=true e payment_date > hoje, salva como pending em vez de inserir transações - Novos endpoints: GET /pending-bills, POST /pending-bills/:id/confirm, DELETE /pending-bills/:id - Dashboard inclui pending_bill_imports no payload - Frontend: resultado "fatura salva como pendente" no ImportView - AccountsView exibe widget de faturas pendentes com ações de confirmar/descartar - dashboard_test: mock de PendingBillRepo + TransactionRepository Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
@@ -24,15 +24,16 @@ type RecentTransaction struct {
|
||||
}
|
||||
|
||||
type DashboardData struct {
|
||||
Month string `json:"month"`
|
||||
TotalIncome float64 `json:"total_income"`
|
||||
TotalExpenses float64 `json:"total_expenses"`
|
||||
SavingsPct float64 `json:"savings_pct"`
|
||||
TotalPatrimony float64 `json:"total_patrimony"`
|
||||
ByCategory []CategoryTotal `json:"by_category"`
|
||||
MonthlyEvolution []MonthEvolution `json:"monthly_evolution"`
|
||||
RecentTransactions []RecentTransaction `json:"recent_transactions"`
|
||||
PendingRecurring int `json:"pending_recurring"`
|
||||
PendingIncomeRecurrings []PendingIncome `json:"pending_income_recurrings"`
|
||||
CurrentBills []CreditBill `json:"current_bills"`
|
||||
Month string `json:"month"`
|
||||
TotalIncome float64 `json:"total_income"`
|
||||
TotalExpenses float64 `json:"total_expenses"`
|
||||
SavingsPct float64 `json:"savings_pct"`
|
||||
TotalPatrimony float64 `json:"total_patrimony"`
|
||||
ByCategory []CategoryTotal `json:"by_category"`
|
||||
MonthlyEvolution []MonthEvolution `json:"monthly_evolution"`
|
||||
RecentTransactions []RecentTransaction `json:"recent_transactions"`
|
||||
PendingRecurring int `json:"pending_recurring"`
|
||||
PendingIncomeRecurrings []PendingIncome `json:"pending_income_recurrings"`
|
||||
CurrentBills []CreditBill `json:"current_bills"`
|
||||
PendingBillImports []PendingBillImport `json:"pending_bill_imports"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package model
|
||||
|
||||
type PendingBillImport struct {
|
||||
ID int `json:"id"`
|
||||
Filename string `json:"filename"`
|
||||
PaymentDate string `json:"payment_date"`
|
||||
Total float64 `json:"total"`
|
||||
Rows []ImportRow `json:"rows"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user