Comp AI CRM is an open source, CRM designed for AI agents. Agentic-first CRM.
TypeScript
fix(app): show select field values in record tables (#133)
Guzman Pintos1d89b43e2d0a
diff --git a/apps/app/components/crm/fields/field-columns.tsx b/apps/app/components/crm/fields/field-columns.tsxindex 00ef3e76..f46b2797 100644--- a/apps/app/components/crm/fields/field-columns.tsx+++ b/apps/app/components/crm/fields/field-columns.tsx@@ -14,18 +14,12 @@ type WithFields = { fields: Record<string, string | number | boolean | null> };function render(type: string,value: string | number | boolean | null,- options: { id: string; label: string }[],users: Map<string, Owner>,) {if (value === null || value === "") return <EmptyCellValue />;if (type === "CHECKBOX") return value === true ? "Yes" : "No";if (type === "DATE") return formatDay(String(value));- if (type === "SELECT") {- return (- options.find((option) => option.id === value)?.label ?? <EmptyCellValue />- );- }if (type === "USER") {const user = users.get(String(value));return user ? <OwnerCell owner={user} /> : <EmptyCellValue />;@@ -66,12 +60,7 @@ export function useFieldColumns<Row extends WithFields>(hideBelow: "lg" as const,cell: (row: Row) => (<span className="truncate">- {render(- field.type,- row.fields[field.key] ?? null,- field.options,- byId,- )}+ {render(field.type, row.fields[field.key] ?? null, byId)}</span>),}));