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:
2026-05-28 22:26:42 -03:00
co-authored by Claude Sonnet 4.6
parent 9742ae7469
commit 2b8524dcde
16 changed files with 453 additions and 32 deletions
+9
View File
@@ -34,6 +34,14 @@ export interface PendingIncome {
late: boolean
}
export interface PendingBillImport {
id: number
filename: string
payment_date: string
total: number
created_at: string
}
export interface DashboardData {
month: string
total_income: number
@@ -46,6 +54,7 @@ export interface DashboardData {
pending_recurring: number
pending_income_recurrings: PendingIncome[]
current_bills: CreditBill[]
pending_bill_imports: PendingBillImport[]
}
export const useDashboardStore = defineStore('dashboard', () => {