mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-06-14 00:56:00 +00:00
feat(dashboard/boletos): nome do boleto como link para lançamentos do período
- nome do boleto virou link para /transactions?q=<nome> - quando o período selecionado não é o atual, inclui ?periodo=<mes-ano> na URL - ícone RiExternalLinkLine ao lado do nome, mesmo padrão do widget de faturas Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,23 @@
|
||||
import type { BillDialogState } from "@/features/dashboard/bills/bills-helpers";
|
||||
import type { DashboardBill } from "@/features/dashboard/bills/bills-queries";
|
||||
import type {
|
||||
BillPaymentAccountOption,
|
||||
DashboardBill,
|
||||
} from "@/features/dashboard/bills/bills-queries";
|
||||
import { BillPaymentDialog } from "./bill-payment-dialog";
|
||||
import { BillsList } from "./bills-list";
|
||||
|
||||
type BillsWidgetViewProps = {
|
||||
bills: DashboardBill[];
|
||||
period?: string;
|
||||
selectedBill: DashboardBill | null;
|
||||
isModalOpen: boolean;
|
||||
modalState: BillDialogState;
|
||||
isPending: boolean;
|
||||
paymentAccountId: string;
|
||||
onPaymentAccountChange: (accountId: string) => void;
|
||||
paymentDate: Date;
|
||||
onPaymentDateChange: (date: Date) => void;
|
||||
paymentAccountOptions: BillPaymentAccountOption[];
|
||||
onOpenPaymentDialog: (billId: string) => void;
|
||||
onClosePaymentDialog: () => void;
|
||||
onConfirmPayment: () => void;
|
||||
@@ -16,10 +25,16 @@ type BillsWidgetViewProps = {
|
||||
|
||||
export function BillsWidgetView({
|
||||
bills,
|
||||
period,
|
||||
selectedBill,
|
||||
isModalOpen,
|
||||
modalState,
|
||||
isPending,
|
||||
paymentAccountId,
|
||||
onPaymentAccountChange,
|
||||
paymentDate,
|
||||
onPaymentDateChange,
|
||||
paymentAccountOptions,
|
||||
onOpenPaymentDialog,
|
||||
onClosePaymentDialog,
|
||||
onConfirmPayment,
|
||||
@@ -27,7 +42,7 @@ export function BillsWidgetView({
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col gap-4">
|
||||
<BillsList bills={bills} onPay={onOpenPaymentDialog} />
|
||||
<BillsList bills={bills} period={period} onPay={onOpenPaymentDialog} />
|
||||
</div>
|
||||
|
||||
<BillPaymentDialog
|
||||
@@ -35,6 +50,11 @@ export function BillsWidgetView({
|
||||
open={isModalOpen}
|
||||
modalState={modalState}
|
||||
isPending={isPending}
|
||||
paymentAccountId={paymentAccountId}
|
||||
onPaymentAccountChange={onPaymentAccountChange}
|
||||
paymentDate={paymentDate}
|
||||
onPaymentDateChange={onPaymentDateChange}
|
||||
paymentAccountOptions={paymentAccountOptions}
|
||||
onClose={onClosePaymentDialog}
|
||||
onConfirm={onConfirmPayment}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user