From b2bfaf4721f008f5bab010b3d55b604b996af152 Mon Sep 17 00:00:00 2001 From: Kelvin Yelyen <52675327+kelvinyelyen@users.noreply.github.com> Date: Wed, 23 Aug 2023 08:22:30 +0000 Subject: [PATCH] Fix issue #1161: Update visible fields on person detail page (#1260) --- .../constants/personShowFieldDefinition.tsx | 56 +++++++++++++++---- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/front/src/pages/people/constants/personShowFieldDefinition.tsx b/front/src/pages/people/constants/personShowFieldDefinition.tsx index 912569323..a80f35d5a 100644 --- a/front/src/pages/people/constants/personShowFieldDefinition.tsx +++ b/front/src/pages/people/constants/personShowFieldDefinition.tsx @@ -5,8 +5,12 @@ import { FieldPhoneMetadata, FieldRelationMetadata, FieldTextMetadata, + FieldURLMetadata, } from '@/ui/editable-field/types/FieldMetadata'; import { + IconBrandLinkedin, + IconBrandX, + IconBriefcase, IconBuildingSkyscraper, IconCalendar, IconMail, @@ -26,6 +30,17 @@ export const personShowFieldDefinition: FieldDefinition[] = [ placeHolder: 'Email', }, } satisfies FieldDefinition, + { + id: 'company', + label: 'Company', + icon: , + type: 'relation', + metadata: { + fieldName: 'company', + relationType: Entity.Company, + useEditButton: true, + }, + } satisfies FieldDefinition, { id: 'phone', label: 'Phone', @@ -45,17 +60,6 @@ export const personShowFieldDefinition: FieldDefinition[] = [ fieldName: 'createdAt', }, } satisfies FieldDefinition, - { - id: 'company', - label: 'Company', - icon: , - type: 'relation', - metadata: { - fieldName: 'company', - relationType: Entity.Company, - useEditButton: true, - }, - } satisfies FieldDefinition, { id: 'city', label: 'City', @@ -66,4 +70,34 @@ export const personShowFieldDefinition: FieldDefinition[] = [ placeHolder: 'City', }, } satisfies FieldDefinition, + { + id: 'jobTitle', + label: 'Job Title', + icon: , + type: 'text', + metadata: { + fieldName: 'jobTitle', + placeHolder: 'Job Title', + }, + } satisfies FieldDefinition, + { + id: 'linkedinUrl', + label: 'Linkedin URL', + icon: , + type: 'url', + metadata: { + fieldName: 'linkedinUrl', + placeHolder: 'Linkedin URL', + }, + } satisfies FieldDefinition, + { + id: 'xUrl', + label: 'X URL', + icon: , + type: 'url', + metadata: { + fieldName: 'xUrl', + placeHolder: 'X URL', + }, + } satisfies FieldDefinition, ];