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:
@@ -76,8 +76,26 @@ function fmt(amount: number) {
|
||||
<div class="fc-view">
|
||||
<span class="fc-pixel fc-view__title">:: IMPORTAR EXTRATO</span>
|
||||
|
||||
<!-- Result banner -->
|
||||
<NeonPanel v-if="store.result" variant="success" title="CONCLUÍDO">
|
||||
<!-- Result banner: pending bill -->
|
||||
<NeonPanel v-if="store.result?.pending" variant="success" title="FATURA SALVA COMO PENDENTE">
|
||||
<div class="fc-import-result">
|
||||
<span class="fc-mono fc-import-result__stat">
|
||||
Vencimento: <span class="fc-text-gold">{{ store.result.pending_bill?.payment_date }}</span>
|
||||
</span>
|
||||
<span class="fc-mono fc-import-result__stat fc-text-green">
|
||||
{{ fmt(store.result.pending_bill?.total ?? 0) }}
|
||||
</span>
|
||||
<span class="fc-mono fc-import-result__stat" style="color:var(--fc-text-dim);font-size:11px">
|
||||
Confirme o pagamento em Contas quando pagar a fatura
|
||||
</span>
|
||||
<button class="fc-btn fc-btn--ghost" @click="store.reset(); selectedFile = null">
|
||||
IMPORTAR OUTRO
|
||||
</button>
|
||||
</div>
|
||||
</NeonPanel>
|
||||
|
||||
<!-- Result banner: imported -->
|
||||
<NeonPanel v-else-if="store.result" variant="success" title="CONCLUÍDO">
|
||||
<div class="fc-import-result">
|
||||
<span class="fc-mono fc-import-result__stat">
|
||||
<span class="fc-text-green">{{ store.result.imported }}</span> importadas
|
||||
@@ -243,7 +261,7 @@ function fmt(amount: number) {
|
||||
<button
|
||||
class="fc-btn fc-btn--primary"
|
||||
:disabled="store.loading || newCount === 0"
|
||||
@click="store.confirm()"
|
||||
@click="store.confirm(csvMapping.all_expenses, csvMapping.all_expenses ? csvMapping.payment_date : '')"
|
||||
>
|
||||
{{ store.loading ? 'SALVANDO...' : `CONFIRMAR ${newCount} TRANSAÇÕES` }}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user