Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
a18accdb83
commit
683a1b553e
@@ -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<Exclude<Category, "all">, string[]> = {
|
||||
lawyers: ["opposing_counsel", "co_counsel"],
|
||||
companies: ["vendor", "court"],
|
||||
people: ["expert", "witness", "process_server", "client_contact", "other"],
|
||||
};
|
||||
|
||||
function categoryOf(type: string | null | undefined): Exclude<Category, "all"> {
|
||||
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: () => (
|
||||
<ProtectedLayout>
|
||||
|
||||
Reference in New Issue
Block a user