Files
twenty/server/src/workspace/workspace-manager/standard-objects/person.ts
Jérémy M b86ada6d2b feat: rename tenant into workspace (#2553)
* feat: rename tenant into workspace

* fix: missing some files and reset not working

* fix: wrong import

* Use link in company seeds

* Use link in company seeds

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-11-17 11:26:33 +01:00

204 lines
4.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { FieldMetadataType } from 'src/metadata/field-metadata/field-metadata.entity';
const personMetadata = {
nameSingular: 'personV2',
namePlural: 'peopleV2',
labelSingular: 'Person',
labelPlural: 'People',
targetTableName: 'person',
description: 'A person',
icon: 'IconUser',
isActive: true,
isSystem: false,
fields: [
{
isCustom: false,
isActive: true,
type: FieldMetadataType.TEXT,
name: 'firstName',
label: 'First name',
targetColumnMap: {
value: 'firstName',
},
description: 'Contacts first name',
icon: 'IconUser',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.TEXT,
name: 'lastName',
label: 'Last name',
targetColumnMap: {
value: 'lastName',
},
description: 'Contacts last name',
icon: 'IconUser',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.EMAIL,
name: 'email',
label: 'Email',
targetColumnMap: {
value: 'email',
},
description: 'Contacts Email',
icon: 'IconMail',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.LINK,
name: 'linkedinUrl',
label: 'Linkedin',
targetColumnMap: {
value: 'linkedinUrl',
},
description: 'Contacts Linkedin account',
icon: 'IconBrandLinkedin',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.LINK,
name: 'xUrl',
label: 'X',
targetColumnMap: {
value: 'xUrl',
},
description: 'Contacts X/Twitter account',
icon: 'IconUser',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.TEXT,
name: 'jobTitle',
label: 'Job Title',
targetColumnMap: {
value: 'jobTitle',
},
description: 'Contacts job title',
icon: 'IconBriefcase',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.TEXT,
name: 'phone',
label: 'Phone',
targetColumnMap: {
value: 'phone',
},
description: 'Contacts phone number',
icon: 'IconPhone',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.TEXT,
name: 'city',
label: 'City',
targetColumnMap: {
value: 'city',
},
description: 'Contacts city',
icon: 'IconMap',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.TEXT,
name: 'avatarUrl',
label: 'Avatar',
targetColumnMap: {
value: 'avatarUrl',
},
description: 'Contacts avatar',
icon: 'IconFileUpload',
isNullable: false,
},
// Relations
{
isCustom: false,
isActive: true,
type: FieldMetadataType.RELATION,
name: 'company',
label: 'Company',
targetColumnMap: {
value: 'companyId',
},
description: 'Contacts company',
icon: 'IconBuildingSkyscraper',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.RELATION,
name: 'pointOfContactForOpportunities',
label: 'POC for Opportunities',
targetColumnMap: {},
description: 'Point of Contact for Opportunities',
icon: 'IconArrowTarget',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.RELATION,
name: 'activityTargets',
label: 'Activities',
targetColumnMap: {},
description: 'Activities tied to the contact',
icon: 'IconCheckbox',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.RELATION,
name: 'opportunities',
label: 'Opportunities',
targetColumnMap: {},
description: 'Opportunities linked to the contact.',
icon: 'IconTargetArrow',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.RELATION,
name: 'favorites',
label: 'Favorites',
targetColumnMap: {},
description: 'Favorites linked to the contact',
icon: 'IconHeart',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.RELATION,
name: 'attachments',
label: 'Attachments',
targetColumnMap: {},
description: 'Attachments linked to the contact.',
icon: 'IconFileImport',
isNullable: true,
},
],
};
export default personMetadata;