mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +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,20 +1,35 @@
|
||||
"use client";
|
||||
|
||||
import type { DashboardBill } from "@/features/dashboard/bills/bills-queries";
|
||||
import type {
|
||||
BillPaymentAccountOption,
|
||||
DashboardBill,
|
||||
} from "@/features/dashboard/bills/bills-queries";
|
||||
import { useBillWidgetController } from "@/features/dashboard/bills/use-bill-widget-controller";
|
||||
import { BillsWidgetView } from "../bills/bills-widget-view";
|
||||
|
||||
type BillWidgetProps = {
|
||||
bills?: DashboardBill[];
|
||||
paymentAccountOptions?: BillPaymentAccountOption[];
|
||||
period?: string;
|
||||
};
|
||||
|
||||
export function BillWidget({ bills }: BillWidgetProps) {
|
||||
const EMPTY_OPTIONS: BillPaymentAccountOption[] = [];
|
||||
|
||||
export function BillWidget({
|
||||
bills,
|
||||
paymentAccountOptions = EMPTY_OPTIONS,
|
||||
period,
|
||||
}: BillWidgetProps) {
|
||||
const {
|
||||
items,
|
||||
selectedBill,
|
||||
isModalOpen,
|
||||
modalState,
|
||||
isPending,
|
||||
paymentAccountId,
|
||||
setPaymentAccountId,
|
||||
paymentDate,
|
||||
setPaymentDate,
|
||||
openPaymentDialog,
|
||||
closePaymentDialog,
|
||||
confirmPayment,
|
||||
@@ -23,10 +38,16 @@ export function BillWidget({ bills }: BillWidgetProps) {
|
||||
return (
|
||||
<BillsWidgetView
|
||||
bills={items}
|
||||
period={period}
|
||||
selectedBill={selectedBill}
|
||||
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