diff --git a/front/src/pages/companies/constants/companyShowFieldDefinition.tsx b/front/src/pages/companies/constants/companyShowFieldDefinition.tsx index 816f79a3a..b3fd4f2eb 100644 --- a/front/src/pages/companies/constants/companyShowFieldDefinition.tsx +++ b/front/src/pages/companies/constants/companyShowFieldDefinition.tsx @@ -19,6 +19,7 @@ import { IconUsers, } from '@/ui/icon'; import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect'; +import { User } from '~/generated/graphql'; export const companyShowFieldDefinition: FieldDefinition[] = [ { @@ -41,6 +42,13 @@ export const companyShowFieldDefinition: FieldDefinition[] = [ fieldName: 'accountOwner', relationType: Entity.User, }, + entityChipDisplayMapper: (dataObject: User) => { + return { + name: dataObject?.displayName, + pictureUrl: dataObject?.avatarUrl ?? undefined, + avatarType: 'rounded', + }; + }, } satisfies FieldDefinition, { key: 'employees', diff --git a/front/src/pages/people/constants/personShowFieldDefinition.tsx b/front/src/pages/people/constants/personShowFieldDefinition.tsx index c2bdcb568..b0010fcff 100644 --- a/front/src/pages/people/constants/personShowFieldDefinition.tsx +++ b/front/src/pages/people/constants/personShowFieldDefinition.tsx @@ -19,6 +19,8 @@ import { IconPhone, } from '@/ui/icon'; import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect'; +import { Company } from '~/generated/graphql'; +import { getLogoUrlFromDomainName } from '~/utils'; export const personShowFieldDefinition: FieldDefinition[] = [ { @@ -41,6 +43,13 @@ export const personShowFieldDefinition: FieldDefinition[] = [ fieldName: 'company', relationType: Entity.Company, }, + entityChipDisplayMapper: (dataObject: Company) => { + return { + name: dataObject?.name, + pictureUrl: getLogoUrlFromDomainName(dataObject?.domainName), + avatarType: 'squared', + }; + }, } satisfies FieldDefinition, { key: 'phone',