Add fullName field metadata type (#2563)

* Add fullName field metadata type

* update seeds
This commit is contained in:
Weiko
2023-11-17 16:52:51 +01:00
committed by GitHub
parent f58e4263bc
commit 4870b0ac30
13 changed files with 147 additions and 92 deletions

View File

@ -11,8 +11,7 @@ export enum SeedPersonFieldMetadataIds {
CreatedAt = '20202020-bec0-4cf0-bf1c-8b2ed21f027a',
UpdatedAt = '20202020-2bf4-42b8-8718-a3e852bfa6a6',
FirstName = '20202020-9b56-4888-bfe3-f6f59aa999e3',
LastName = '20202020-b784-458a-869d-6c53fa85483d',
Name = '20202020-9b56-4888-bfe3-f6f59aa999e3',
Email = '20202020-8a96-4e4b-86fd-ea126530e0c1',
LinkedinLink = '20202020-dcf6-445a-b543-37e55de43c25',
@ -113,40 +112,23 @@ export const seedPersonFieldMetadata = async (
},
// Main Identifier
{
id: SeedPersonFieldMetadataIds.FirstName,
id: SeedPersonFieldMetadataIds.Name,
objectMetadataId: SeedObjectMetadataIds.Person,
isCustom: false,
workspaceId: SeedWorkspaceId,
isActive: true,
type: FieldMetadataType.TEXT,
name: 'firstName',
label: 'First name',
type: FieldMetadataType.FULL_NAME,
name: 'name',
label: 'Name',
targetColumnMap: {
value: 'firstName',
firstName: 'nameFirstName',
lastName: 'nameLastName',
},
description: 'Contacts first name',
description: 'Contacts name',
icon: 'IconUser',
isNullable: false,
isSystem: false,
defaultValue: { value: '' },
},
{
id: SeedPersonFieldMetadataIds.LastName,
objectMetadataId: SeedObjectMetadataIds.Person,
isCustom: false,
workspaceId: SeedWorkspaceId,
isActive: true,
type: FieldMetadataType.TEXT,
name: 'lastName',
label: 'Last name',
targetColumnMap: {
value: 'lastName',
},
description: 'Contacts last name',
icon: 'IconUser',
isNullable: false,
isSystem: false,
defaultValue: { value: '' },
defaultValue: { firstName: '', lastName: '' },
},
// Scalar Fields

View File

@ -11,8 +11,8 @@ export const seedPeople = async (
.insert()
.into(`${schemaName}.${tableName}`, [
'id',
'firstName',
'lastName',
'nameFirstName',
'nameLastName',
'phone',
'city',
'companyId',
@ -22,8 +22,8 @@ export const seedPeople = async (
.values([
{
id: '86083141-1c0e-494c-a1b6-85b1c6fefaa5',
firstName: 'Christoph',
lastName: 'Callisto',
nameFirstName: 'Christoph',
nameLastName: 'Callisto',
phone: '+33789012345',
city: 'Seattle',
companyId: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
@ -31,8 +31,8 @@ export const seedPeople = async (
},
{
id: '0aa00beb-ac73-4797-824e-87a1f5aea9e0',
firstName: 'Sylvie',
lastName: 'Palmer',
nameFirstName: 'Sylvie',
nameLastName: 'Palmer',
phone: '+33780123456',
city: 'Los Angeles',
companyId: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
@ -40,8 +40,8 @@ export const seedPeople = async (
},
{
id: '93c72d2e-f517-42fd-80ae-14173b3b70ae',
firstName: 'Christopher',
lastName: 'Gonzalez',
nameFirstName: 'Christopher',
nameLastName: 'Gonzalez',
phone: '+33789012345',
city: 'Seattle',
companyId: '118995f3-5d81-46d6-bf83-f7fd33ea6102',
@ -49,8 +49,8 @@ export const seedPeople = async (
},
{
id: 'eeeacacf-eee1-4690-ad2c-8619e5b56a2e',
firstName: 'Ashley',
lastName: 'Parker',
nameFirstName: 'Ashley',
nameLastName: 'Parker',
phone: '+33780123456',
city: 'Los Angeles',
companyId: '118995f3-5d81-46d6-bf83-f7fd33ea6102',
@ -58,8 +58,8 @@ export const seedPeople = async (
},
{
id: '9b324a88-6784-4449-afdf-dc62cb8702f2',
firstName: 'Nicholas',
lastName: 'Wright',
nameFirstName: 'Nicholas',
nameLastName: 'Wright',
phone: '+33781234567',
city: 'Seattle',
companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4',
@ -67,8 +67,8 @@ export const seedPeople = async (
},
{
id: '1d151852-490f-4466-8391-733cfd66a0c8',
firstName: 'Isabella',
lastName: 'Scott',
nameFirstName: 'Isabella',
nameLastName: 'Scott',
phone: '+33782345678',
city: 'New York',
companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4',
@ -76,8 +76,8 @@ export const seedPeople = async (
},
{
id: '98406e26-80f1-4dff-b570-a74942528de3',
firstName: 'Matthew',
lastName: 'Green',
nameFirstName: 'Matthew',
nameLastName: 'Green',
phone: '+33783456789',
city: 'Seattle',
companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4',
@ -85,8 +85,8 @@ export const seedPeople = async (
},
{
id: 'a2e78a5f-338b-46df-8811-fa08c7d19d35',
firstName: 'Elizabeth',
lastName: 'Baker',
nameFirstName: 'Elizabeth',
nameLastName: 'Baker',
phone: '+33784567890',
city: 'New York',
companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
@ -94,8 +94,8 @@ export const seedPeople = async (
},
{
id: 'ca1f5bf3-64ad-4b0e-bbfd-e9fd795b7016',
firstName: 'Christopher',
lastName: 'Nelson',
nameFirstName: 'Christopher',
nameLastName: 'Nelson',
phone: '+33785678901',
city: 'San Francisco',
companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
@ -103,8 +103,8 @@ export const seedPeople = async (
},
{
id: '56955422-5d54-41b7-ba36-f0d20e1417ae',
firstName: 'Avery',
lastName: 'Carter',
nameFirstName: 'Avery',
nameLastName: 'Carter',
phone: '+33786789012',
city: 'New York',
companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
@ -112,8 +112,8 @@ export const seedPeople = async (
},
{
id: '755035db-623d-41fe-92e7-dd45b7c568e1',
firstName: 'Ethan',
lastName: 'Mitchell',
nameFirstName: 'Ethan',
nameLastName: 'Mitchell',
phone: '+33787890123',
city: 'Los Angeles',
companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
@ -121,8 +121,8 @@ export const seedPeople = async (
},
{
id: '240da2ec-2d40-4e49-8df4-9c6a049190ef',
firstName: 'Madison',
lastName: 'Perez',
nameFirstName: 'Madison',
nameLastName: 'Perez',
phone: '+33788901234',
city: 'Seattle',
companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
@ -130,8 +130,8 @@ export const seedPeople = async (
},
{
id: '240da2ec-2d40-4e49-8df4-9c6a049190df',
firstName: 'Bertrand',
lastName: 'Voulzy',
nameFirstName: 'Bertrand',
nameLastName: 'Voulzy',
phone: '+33788901234',
city: 'Seattle',
companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
@ -139,8 +139,8 @@ export const seedPeople = async (
},
{
id: '240da2ec-2d40-4e49-8df4-9c6a049191de',
firstName: 'Louis',
lastName: 'Duss',
nameFirstName: 'Louis',
nameLastName: 'Duss',
phone: '+33788901234',
city: 'Seattle',
companyId: 'a7bc68d5-f79e-40dd-bd06-c36e6abb4678',
@ -148,8 +148,8 @@ export const seedPeople = async (
},
{
id: '240da2ec-2d40-4e49-8df4-9c6a049191df',
firstName: 'Lorie',
lastName: 'Vladim',
nameFirstName: 'Lorie',
nameLastName: 'Vladim',
phone: '+33788901235',
city: 'Seattle',
companyId: 'a674fa6c-1455-4c57-afaf-dd5dc086361d',