= {};
+ for (const r of collectionsRes.data ?? []) {
+ const cid = (r as any).case_id as string | null;
+ if (!cid) continue;
+ const cur = flagMap[cid] ?? { bk: false, pp: false };
+ if ((r as any).in_bankruptcy) cur.bk = true;
+ if ((r as any).on_payment_plan) cur.pp = true;
+ flagMap[cid] = cur;
+ }
+
// Fallback to the case's own updated_at if no child activity found.
const enriched = baseRows.map((c: any) => {
const childTs = latest[c.id];
const lastActivity = childTs && (!c.updated_at || childTs > c.updated_at) ? childTs : c.updated_at;
- return { ...c, last_activity: lastActivity };
+ const flags = flagMap[c.id];
+ return { ...c, last_activity: lastActivity, in_bankruptcy: !!flags?.bk, on_payment_plan: !!flags?.pp };
});
setCases(enriched);
From 2c5193b3eb86c9f55713e45aa7a0858598270123 Mon Sep 17 00:00:00 2001
From: "gpt-engineer-app[bot]"
<159125892+gpt-engineer-app[bot]@users.noreply.github.com>
Date: Mon, 20 Apr 2026 00:25:16 +0000
Subject: [PATCH 5/5] Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
---
src/routes/cases.index.tsx | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/routes/cases.index.tsx b/src/routes/cases.index.tsx
index b48f982..31740a6 100644
--- a/src/routes/cases.index.tsx
+++ b/src/routes/cases.index.tsx
@@ -471,14 +471,17 @@ function CasesList() {
/>
|
- e.stopPropagation()}
- >
- {c.title}
-
+
+ e.stopPropagation()}
+ >
+ {c.title}
+
+
+
{c.case_number}
|
{c.client?.name ?? "—"} |