From 791fa8923a9de285c32bea79fd52c9598c0fbe32 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:23:37 +0000 Subject: [PATCH 1/5] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/integrations/supabase/types.ts | 6 ++++++ .../20260420002334_d0b4f70d-eacd-4414-a0cd-56920375d885.sql | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 supabase/migrations/20260420002334_d0b4f70d-eacd-4414-a0cd-56920375d885.sql diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index 4947872..d22a0e1 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -880,9 +880,11 @@ export type Database = { current_stage: string | null homeowner_id: string | null id: string + in_bankruptcy: boolean interest_rate_override: number | null name: string | null notes: string | null + on_payment_plan: boolean opened_at: string status: string updated_at: string @@ -895,9 +897,11 @@ export type Database = { current_stage?: string | null homeowner_id?: string | null id?: string + in_bankruptcy?: boolean interest_rate_override?: number | null name?: string | null notes?: string | null + on_payment_plan?: boolean opened_at?: string status?: string updated_at?: string @@ -910,9 +914,11 @@ export type Database = { current_stage?: string | null homeowner_id?: string | null id?: string + in_bankruptcy?: boolean interest_rate_override?: number | null name?: string | null notes?: string | null + on_payment_plan?: boolean opened_at?: string status?: string updated_at?: string diff --git a/supabase/migrations/20260420002334_d0b4f70d-eacd-4414-a0cd-56920375d885.sql b/supabase/migrations/20260420002334_d0b4f70d-eacd-4414-a0cd-56920375d885.sql new file mode 100644 index 0000000..ecc5465 --- /dev/null +++ b/supabase/migrations/20260420002334_d0b4f70d-eacd-4414-a0cd-56920375d885.sql @@ -0,0 +1,3 @@ +ALTER TABLE public.collections + ADD COLUMN IF NOT EXISTS in_bankruptcy boolean NOT NULL DEFAULT false, + ADD COLUMN IF NOT EXISTS on_payment_plan boolean NOT NULL DEFAULT false; \ No newline at end of file From b1ab7656e30ab32ac972b4aee2d3114eb3c43178 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:24:08 +0000 Subject: [PATCH 2/5] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- .../collections/status-flag-badges.tsx | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/components/collections/status-flag-badges.tsx diff --git a/src/components/collections/status-flag-badges.tsx b/src/components/collections/status-flag-badges.tsx new file mode 100644 index 0000000..423a516 --- /dev/null +++ b/src/components/collections/status-flag-badges.tsx @@ -0,0 +1,40 @@ +import { Badge } from "@/components/ui/badge"; + +/** + * Compact BK / PP indicator badges used next to case/collection names. + * - BK = Bankruptcy + * - PP = Payment Plan + */ +export function StatusFlagBadges({ + bk, + pp, + className, +}: { + bk?: boolean | null; + pp?: boolean | null; + className?: string; +}) { + if (!bk && !pp) return null; + return ( + + {bk && ( + + BK + + )} + {pp && ( + + PP + + )} + + ); +} From d87d4c5749540632339d41cc3d5be99f9cf6c2ff 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:24:39 +0000 Subject: [PATCH 3/5] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/components/cases/collections-tab.tsx | 8 ++++- src/routes/collections.$collectionId.tsx | 42 ++++++++++++++++++++++++ src/routes/collections.index.tsx | 4 ++- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/components/cases/collections-tab.tsx b/src/components/cases/collections-tab.tsx index 1e7904d..d6d0e57 100644 --- a/src/components/cases/collections-tab.tsx +++ b/src/components/cases/collections-tab.tsx @@ -77,6 +77,7 @@ import { import { SortableLedgerRow } from "./ledger-row"; import { ApplyCollectionWorkflowDialog } from "@/components/collections/apply-collection-workflow-dialog"; import { MergeCollectionsDialog } from "./merge-collections-dialog"; +import { StatusFlagBadges } from "@/components/collections/status-flag-badges"; const TXN_TYPES = [ { value: "assessment", label: "Assessment" }, @@ -303,7 +304,12 @@ export function CaseCollectionsTab({ onClick={() => setActiveId(c.id)} > - {c.homeowner?.last_name}, {c.homeowner?.first_name} + + + {c.homeowner?.last_name}, {c.homeowner?.first_name} + + + {c.homeowner?.unit_number || "—"} diff --git a/src/routes/collections.$collectionId.tsx b/src/routes/collections.$collectionId.tsx index a8665e3..7e62441 100644 --- a/src/routes/collections.$collectionId.tsx +++ b/src/routes/collections.$collectionId.tsx @@ -67,6 +67,7 @@ import { SearchableSelect } from "@/components/ui/searchable-select"; import { toast } from "sonner"; import { spawnNextCollectionWorkflowTask } from "@/lib/workflow-chain"; import { ApplyCollectionWorkflowDialog } from "@/components/collections/apply-collection-workflow-dialog"; +import { StatusFlagBadges } from "@/components/collections/status-flag-badges"; export const Route = createFileRoute("/collections/$collectionId")({ component: CollectionDetailRoute, @@ -356,8 +357,49 @@ function CollectionDetailRoute() { Closed{collection.closed_at ? ` · ${formatDate(collection.closed_at)}` : ""} )} +
+ +