Convert metadata tables to camelCase (#2400)
* Convert metadata tables to camelCase * datasourcemetadataid to datasourceid * refactor metadata folders * fix command * move commands out of metadata * fix seed * rename objectId and fieldId in objectMetadataId and fieldMetadataId in FE * fix field-metadata * Fix * Fix * remove logs --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -23,7 +23,7 @@ import { getLogoUrlFromDomainName } from '~/utils';
|
||||
|
||||
export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
{
|
||||
fieldId: 'email',
|
||||
fieldMetadataId: 'email',
|
||||
label: 'Email',
|
||||
Icon: IconMail,
|
||||
type: 'TEXT',
|
||||
@ -33,7 +33,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldTextMetadata>,
|
||||
{
|
||||
fieldId: 'company',
|
||||
fieldMetadataId: 'company',
|
||||
label: 'Company',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'RELATION',
|
||||
@ -50,7 +50,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldRelationMetadata>,
|
||||
{
|
||||
fieldId: 'phone',
|
||||
fieldMetadataId: 'phone',
|
||||
label: 'Phone',
|
||||
Icon: IconPhone,
|
||||
type: 'PHONE',
|
||||
@ -60,7 +60,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldPhoneMetadata>,
|
||||
{
|
||||
fieldId: 'jobTitle',
|
||||
fieldMetadataId: 'jobTitle',
|
||||
label: 'Job Title',
|
||||
Icon: IconBriefcase,
|
||||
type: 'TEXT',
|
||||
@ -70,7 +70,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldTextMetadata>,
|
||||
{
|
||||
fieldId: 'city',
|
||||
fieldMetadataId: 'city',
|
||||
label: 'City',
|
||||
Icon: IconMap,
|
||||
type: 'TEXT',
|
||||
@ -80,7 +80,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldTextMetadata>,
|
||||
{
|
||||
fieldId: 'linkedinUrl',
|
||||
fieldMetadataId: 'linkedinUrl',
|
||||
label: 'Linkedin URL',
|
||||
Icon: IconBrandLinkedin,
|
||||
type: 'URL',
|
||||
@ -90,7 +90,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldURLMetadata>,
|
||||
{
|
||||
fieldId: 'xUrl',
|
||||
fieldMetadataId: 'xUrl',
|
||||
label: 'X URL',
|
||||
Icon: IconBrandX,
|
||||
type: 'URL',
|
||||
@ -100,7 +100,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldURLMetadata>,
|
||||
{
|
||||
fieldId: 'createdAt',
|
||||
fieldMetadataId: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendar,
|
||||
type: 'DATE',
|
||||
|
||||
@ -13,25 +13,25 @@ import { Person } from '~/generated/graphql';
|
||||
export const personTableFilterDefinitions: FilterDefinitionByEntity<Person>[] =
|
||||
[
|
||||
{
|
||||
fieldId: 'firstName',
|
||||
fieldMetadataId: 'firstName',
|
||||
label: 'First name',
|
||||
Icon: IconUser,
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'lastName',
|
||||
fieldMetadataId: 'lastName',
|
||||
label: 'Last name',
|
||||
Icon: IconUser,
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'email',
|
||||
fieldMetadataId: 'email',
|
||||
label: 'Email',
|
||||
Icon: IconMail,
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'companyId',
|
||||
fieldMetadataId: 'companyId',
|
||||
label: 'Company',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'ENTITY',
|
||||
@ -39,19 +39,19 @@ export const personTableFilterDefinitions: FilterDefinitionByEntity<Person>[] =
|
||||
entitySelectComponent: <FilterDropdownCompanySearchSelect />,
|
||||
},
|
||||
{
|
||||
fieldId: 'phone',
|
||||
fieldMetadataId: 'phone',
|
||||
label: 'Phone',
|
||||
Icon: IconPhone,
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'createdAt',
|
||||
fieldMetadataId: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendarEvent,
|
||||
type: 'DATE',
|
||||
},
|
||||
{
|
||||
fieldId: 'city',
|
||||
fieldMetadataId: 'city',
|
||||
label: 'City',
|
||||
Icon: IconMap,
|
||||
type: 'TEXT',
|
||||
|
||||
@ -11,7 +11,7 @@ import { SortDirection } from '@/ui/object/object-sort-dropdown/types/SortDirect
|
||||
|
||||
export const personTableSortDefinitions: SortDefinition[] = [
|
||||
{
|
||||
fieldId: 'fullname',
|
||||
fieldMetadataId: 'fullname',
|
||||
label: 'People',
|
||||
Icon: IconUser,
|
||||
|
||||
@ -21,7 +21,7 @@ export const personTableSortDefinitions: SortDefinition[] = [
|
||||
],
|
||||
},
|
||||
{
|
||||
fieldId: 'company_name',
|
||||
fieldMetadataId: 'company_name',
|
||||
label: 'Company',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
getOrderByTemplate: (direction: SortDirection) => [
|
||||
@ -29,22 +29,22 @@ export const personTableSortDefinitions: SortDefinition[] = [
|
||||
],
|
||||
},
|
||||
{
|
||||
fieldId: 'email',
|
||||
fieldMetadataId: 'email',
|
||||
label: 'Email',
|
||||
Icon: IconMail,
|
||||
},
|
||||
{
|
||||
fieldId: 'phone',
|
||||
fieldMetadataId: 'phone',
|
||||
label: 'Phone',
|
||||
Icon: IconPhone,
|
||||
},
|
||||
{
|
||||
fieldId: 'createdAt',
|
||||
fieldMetadataId: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendarEvent,
|
||||
},
|
||||
{
|
||||
fieldId: 'city',
|
||||
fieldMetadataId: 'city',
|
||||
label: 'City',
|
||||
Icon: IconMap,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user