From 1a11c65a6f967718a69c7ece0f4d1056777a789e 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 07:08:41 +0000 Subject: [PATCH 1/2] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/collections.$collectionId.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/routes/collections.$collectionId.tsx b/src/routes/collections.$collectionId.tsx index 2132c0e..3fd691a 100644 --- a/src/routes/collections.$collectionId.tsx +++ b/src/routes/collections.$collectionId.tsx @@ -27,6 +27,16 @@ import { } from "@/components/ui/dialog"; import { CollectionDetail } from "@/components/cases/collections-tab"; import { PaymentPlansPanel } from "@/components/collections/payment-plans-panel"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { ContactsLinkTab } from "@/components/contacts/contacts-link-tab"; +import { CaseCallLogsTab } from "@/components/cases/call-logs-tab"; +import { CaseDocumentsTab } from "@/components/cases/documents-tab"; +import { CaseTimeTab } from "@/components/cases/time-tab"; +import { CaseExpensesTab } from "@/components/cases/expenses-tab"; +import { CaseStatusTab } from "@/components/cases/status-tab"; +import { CaseInvoicesTab } from "@/components/cases/invoices-tab"; +import { CaseLitigationTab } from "@/components/cases/litigation-tab"; +import { CaseCustomFieldsTab } from "@/components/cases/custom-fields-tab"; import { formatDate } from "@/lib/format"; import { ArrowLeft, @@ -37,6 +47,16 @@ import { Loader2, Plus, Trash2, + Workflow, + Scale, + Activity, + FileText, + Contact, + Clock, + DollarSign, + Receipt, + Phone, + Tag, } from "lucide-react"; import { toast } from "sonner"; From 629ae95fc5ff487bc3480f5d9d899beca1b3f7ef 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 07:09:17 +0000 Subject: [PATCH 2/2] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/collections.$collectionId.tsx | 354 +++++++++++++---------- 1 file changed, 195 insertions(+), 159 deletions(-) diff --git a/src/routes/collections.$collectionId.tsx b/src/routes/collections.$collectionId.tsx index 3fd691a..40c6ca8 100644 --- a/src/routes/collections.$collectionId.tsx +++ b/src/routes/collections.$collectionId.tsx @@ -298,168 +298,204 @@ function CollectionDetailRoute() { All collections - {/* Workflow header */} - - -
-
- Workflow stage -
-
- {stages.map((s, i) => { - const isCurrent = s.key === collection.current_stage; - const isPast = i < currentStageIdx; - return ( -
- - {s.label} - - {i < stages.length - 1 && ( - - )} -
- ); - })} -
-
- -
-
- - {/* Tasks */} - - -
-

- - Tasks - {openTasks.length > 0 && ( - - {openTasks.length} open - - )} -

- -
- {tasks.length === 0 ? ( -

- No tasks yet. Escalate to populate the next stage's checklist, or - add one manually. -

- ) : ( -
- {[...openTasks, ...doneTasks].map((t) => { - const stageLabel = - stages.find((s) => s.key === t.stage_key)?.label; - const overdue = - !t.done && - t.due_date && - new Date(t.due_date) < new Date(new Date().toDateString()); - return ( -
- -
-
- {t.title} -
- {stageLabel && ( -
- {stageLabel} -
- )} -
- updateDueDate(t.id, e.target.value)} - /> - - -
- ); - })} -
+ {/* Tabs: Workflow (collections-specific) + same case tabs */} + + + Workflow + {collection.case && ( + <> + Litigation + Status log + Documents + Contacts + Time + Expenses + Invoices + Calls + Custom fields + )} -
-
+ - {/* Payment plans */} - + + {/* Workflow header */} + + +
+
+ Workflow stage +
+
+ {stages.map((s, i) => { + const isCurrent = s.key === collection.current_stage; + const isPast = i < currentStageIdx; + return ( +
+ + {s.label} + + {i < stages.length - 1 && ( + + )} +
+ ); + })} +
+
+ +
+
- {/* Ledger */} - navigate({ to: "/collections" })} - onChange={() => setReload((r) => r + 1)} - /> + {/* Tasks */} + + +
+

+ + Tasks + {openTasks.length > 0 && ( + + {openTasks.length} open + + )} +

+ +
+ {tasks.length === 0 ? ( +

+ No tasks yet. Escalate to populate the next stage's checklist, or + add one manually. +

+ ) : ( +
+ {[...openTasks, ...doneTasks].map((t) => { + const stageLabel = + stages.find((s) => s.key === t.stage_key)?.label; + const overdue = + !t.done && + t.due_date && + new Date(t.due_date) < new Date(new Date().toDateString()); + return ( +
+ +
+
+ {t.title} +
+ {stageLabel && ( +
+ {stageLabel} +
+ )} +
+ updateDueDate(t.id, e.target.value)} + /> + + +
+ ); + })} +
+ )} +
+
+ + {/* Payment plans */} + + + {/* Ledger */} + navigate({ to: "/collections" })} + onChange={() => setReload((r) => r + 1)} + /> +
+ + {collection.case && ( + <> + setReload((r) => r + 1)} /> + + + + {}} /> + + + + + + )} +