From b28839b22e5bd8b12ecb2ddce9bb5576c4fa7057 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 20:54:23 +0000 Subject: [PATCH 1/6] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 86ec365..b5cbbe2 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -9,7 +9,7 @@ import { supabase } from "@/integrations/supabase/client"; import { useAuth } from "@/lib/auth"; import { Briefcase, Receipt, Clock, ArrowRight, CalendarDays, FileText, - CheckSquare, UserPlus, DollarSign, Wallet, AlertCircle, + CheckSquare, UserPlus, DollarSign, Wallet, AlertCircle, CreditCard, } from "lucide-react"; import { formatCurrency, formatDate, statusBadgeClass } from "@/lib/format"; import { format, startOfDay, startOfMonth, endOfMonth, subDays } from "date-fns"; From 1a2f6b1f13e5688fef0a584ff9e4bc579f940d33 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 20:54:32 +0000 Subject: [PATCH 2/6] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index b5cbbe2..d175a0c 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -47,6 +47,7 @@ function Dashboard() { const [todaysEvents, setTodaysEvents] = useState([]); const [recentCases, setRecentCases] = useState([]); const [recentInvoices, setRecentInvoices] = useState([]); + const [recentPayments, setRecentPayments] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { From e55fea1977d52074b31b6e2fefe650d4b5d47077 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 20:54:49 +0000 Subject: [PATCH 3/6] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index d175a0c..3b8083e 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -65,7 +65,7 @@ function Dashboard() { myAssigneeRes, openCasesRes, newCasesRes, closedCasesRes, tasksTodayRes, hearingsTodayRes, - recentCasesRes, recentInvRes, + recentCasesRes, recentInvRes, recentPayRes, ] = await Promise.all([ supabase.from("trust_ledger_entries").select("entry_type, amount"), supabase.from("invoice_payments").select("amount, paid_on").gte("paid_on", monthStart).lte("paid_on", monthEnd), @@ -78,6 +78,7 @@ function Dashboard() { supabase.from("cases").select("id, title, case_number, next_hearing_date, next_hearing_notes").eq("next_hearing_date", todayStr), supabase.from("cases").select("id, case_number, title, status, updated_at, client:clients(name)").order("updated_at", { ascending: false }).limit(5), supabase.from("invoices").select("id, invoice_number, total, status, issue_date, client:clients(name)").order("created_at", { ascending: false }).limit(5), + supabase.from("payment_requests").select("id, recipient_name, description, total_amount_cents, status, created_at, paid_at").order("created_at", { ascending: false }).limit(5), ]); // Trust balance From 03e0b1f912e12eff79aa53dcb0a6f6499267f21b Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 20:54:57 +0000 Subject: [PATCH 4/6] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 3b8083e..48eb065 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -134,6 +134,7 @@ function Dashboard() { setTodaysEvents(evts); setRecentCases(recentCasesRes.data ?? []); setRecentInvoices(recentInvRes.data ?? []); + setRecentPayments(recentPayRes.data ?? []); setLoading(false); })(); }, [user?.id]); From 4d5b4027dba1690bbb3fba848085df28501fa668 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 20:55:09 +0000 Subject: [PATCH 5/6] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/index.tsx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 48eb065..0d0e9c0 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -316,6 +316,40 @@ function Dashboard() { + + + {/* Recent payments */} +
+ + + + + Recent payments + + + + + {recentPayments.length === 0 &&

No payment requests yet.

} + {recentPayments.map((p) => ( + +
+
{p.recipient_name}
+
+ {p.description || "Payment request"} ยท {formatDate(p.paid_at || p.created_at)} +
+
+
+ {formatCurrency((p.total_amount_cents ?? 0) / 100)} + {p.status} +
+ + ))} +
+
+
); } From c423c3e25a702e1d85d7f346fc3f1243d31cf25d Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 20:55:18 +0000 Subject: [PATCH 6/6] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 0d0e9c0..dba1b98 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -316,7 +316,6 @@ function Dashboard() { - {/* Recent payments */}