From 683a1b553e9d16dd3d40d7e7e1965be1ead81ae4 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 02:57:15 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/contacts.index.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/routes/contacts.index.tsx b/src/routes/contacts.index.tsx index 4d342b0..ef908dd 100644 --- a/src/routes/contacts.index.tsx +++ b/src/routes/contacts.index.tsx @@ -14,6 +14,21 @@ import { Plus, Search, Mail, Phone, Building2, ChevronRight, Edit, Trash2, Brief import { ContactFormDialog, CONTACT_TYPES, type ContactRecord } from "@/components/contacts/contact-form-dialog"; import { setArchived } from "@/lib/archive"; +type Category = "all" | "companies" | "people" | "lawyers"; + +const CATEGORY_TYPES: Record, string[]> = { + lawyers: ["opposing_counsel", "co_counsel"], + companies: ["vendor", "court"], + people: ["expert", "witness", "process_server", "client_contact", "other"], +}; + +function categoryOf(type: string | null | undefined): Exclude { + const t = type ?? "other"; + if (CATEGORY_TYPES.lawyers.includes(t)) return "lawyers"; + if (CATEGORY_TYPES.companies.includes(t)) return "companies"; + return "people"; +} + export const Route = createFileRoute("/contacts/")({ component: () => (