mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
feat(dashboard): confirmação de pagamento com conta e data para faturas e boletos
- widget de faturas abre modal com seleção de conta de origem e data antes de pagar - widget de boletos ganha a mesma paridade: modal com conta de pagamento e data - toggleTransactionSettlementAction aceita paymentAccountId e paymentDate opcionais - DashboardBill expõe accountId para inicializar o modal com a conta já vinculada Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,20 +1,31 @@
|
||||
"use client";
|
||||
|
||||
import type { DashboardInvoice } from "@/features/dashboard/invoices/invoices-queries";
|
||||
import type {
|
||||
DashboardInvoice,
|
||||
InvoicePaymentAccountOption,
|
||||
} from "@/features/dashboard/invoices/invoices-queries";
|
||||
import { useInvoicesWidgetController } from "@/features/dashboard/invoices/use-invoices-widget-controller";
|
||||
import { InvoicesWidgetView } from "../invoices/invoices-widget-view";
|
||||
|
||||
type InvoicesWidgetProps = {
|
||||
invoices: DashboardInvoice[];
|
||||
paymentAccountOptions: InvoicePaymentAccountOption[];
|
||||
};
|
||||
|
||||
export function InvoicesWidget({ invoices }: InvoicesWidgetProps) {
|
||||
export function InvoicesWidget({
|
||||
invoices,
|
||||
paymentAccountOptions,
|
||||
}: InvoicesWidgetProps) {
|
||||
const {
|
||||
items,
|
||||
selectedInvoice,
|
||||
isModalOpen,
|
||||
modalState,
|
||||
isPending,
|
||||
paymentAccountId,
|
||||
setPaymentAccountId,
|
||||
paymentDate,
|
||||
setPaymentDate,
|
||||
openPaymentDialog,
|
||||
closePaymentDialog,
|
||||
confirmPayment,
|
||||
@@ -27,6 +38,11 @@ export function InvoicesWidget({ invoices }: InvoicesWidgetProps) {
|
||||
isModalOpen={isModalOpen}
|
||||
modalState={modalState}
|
||||
isPending={isPending}
|
||||
paymentAccountId={paymentAccountId}
|
||||
onPaymentAccountChange={setPaymentAccountId}
|
||||
paymentDate={paymentDate}
|
||||
onPaymentDateChange={setPaymentDate}
|
||||
paymentAccountOptions={paymentAccountOptions}
|
||||
onOpenPaymentDialog={openPaymentDialog}
|
||||
onClosePaymentDialog={closePaymentDialog}
|
||||
onConfirmPayment={confirmPayment}
|
||||
|
||||
Reference in New Issue
Block a user