From 7de6d899f11506709e373fd835b7f0ed2020d7be Mon Sep 17 00:00:00 2001 From: kibin Date: Wed, 1 Apr 2026 07:44:53 +0000 Subject: [PATCH 1/2] fix(254): modal scrollable with sticky footer --- src/components/ui/Modal.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/ui/Modal.tsx b/src/components/ui/Modal.tsx index 7713723..1ce1456 100644 --- a/src/components/ui/Modal.tsx +++ b/src/components/ui/Modal.tsx @@ -9,10 +9,11 @@ interface ModalProps { onClose: () => void; title: string; children: React.ReactNode; + footer?: React.ReactNode; className?: string; } -export function Modal({ isOpen, onClose, title, children, className }: ModalProps) { +export function Modal({ isOpen, onClose, title, children, footer, className }: ModalProps) { const overlayRef = useRef(null); useEffect(() => { @@ -31,8 +32,8 @@ export function Modal({ isOpen, onClose, title, children, className }: ModalProp className="fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4" onClick={(e) => e.target === overlayRef.current && onClose()} > -
-
+
+

{title}

-
{children}
+
{children}
+ {footer && ( +
+ {footer} +
+ )}
); -- 2.43.0 From c5826a34d0941b7a80868982b043484ad66d6267 Mon Sep 17 00:00:00 2001 From: kibin Date: Wed, 1 Apr 2026 07:45:02 +0000 Subject: [PATCH 2/2] fix(254): move invoice modal buttons to sticky footer --- app/(app)/invoices/page.tsx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/app/(app)/invoices/page.tsx b/app/(app)/invoices/page.tsx index 77cc8b6..6be0257 100644 --- a/app/(app)/invoices/page.tsx +++ b/app/(app)/invoices/page.tsx @@ -154,7 +154,20 @@ export default function InvoicesPage() { {/* Invoice Detail Modal */} - setSelected(null)} title={`Invoice ${selected?.invoiceNumber ?? ""}`} className="max-w-lg"> + setSelected(null)} + title={`Invoice ${selected?.invoiceNumber ?? ""}`} + className="max-w-lg" + footer={selected ? ( + <> + {selected.status !== "VOID" && selected.status !== "PAID" && ( + + )} + + + ) : undefined} + > {selected && (
@@ -196,13 +209,6 @@ export default function InvoicesPage() { disabled={!payForm.amount}>Record Payment
)} - -
- {selected.status !== "VOID" && selected.status !== "PAID" && ( - - )} - -
)}
-- 2.43.0