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:
@ -93,10 +93,11 @@ export const CompanyShow = () => {
|
||||
{companyShowFieldDefinitions.map((fieldDefinition) => {
|
||||
return (
|
||||
<FieldContext.Provider
|
||||
key={company.id + fieldDefinition.fieldId}
|
||||
key={company.id + fieldDefinition.fieldMetadataId}
|
||||
value={{
|
||||
entityId: company.id,
|
||||
recoilScopeId: company.id + fieldDefinition.fieldId,
|
||||
recoilScopeId:
|
||||
company.id + fieldDefinition.fieldMetadataId,
|
||||
fieldDefinition,
|
||||
useUpdateEntityMutation: useUpdateOneCompanyMutation,
|
||||
hotkeyScope: InlineCellHotkeyScope.InlineCell,
|
||||
|
||||
@ -22,7 +22,7 @@ import { User } from '~/generated/graphql';
|
||||
|
||||
export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
|
||||
{
|
||||
fieldId: 'domainName',
|
||||
fieldMetadataId: 'domainName',
|
||||
label: 'Domain name',
|
||||
Icon: IconLink,
|
||||
type: 'URL',
|
||||
@ -32,7 +32,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldURLMetadata>,
|
||||
{
|
||||
fieldId: 'accountOwner',
|
||||
fieldMetadataId: 'accountOwner',
|
||||
label: 'Account owner',
|
||||
Icon: IconUserCircle,
|
||||
type: 'RELATION',
|
||||
@ -49,7 +49,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldRelationMetadata>,
|
||||
{
|
||||
fieldId: 'employees',
|
||||
fieldMetadataId: 'employees',
|
||||
label: 'Employees',
|
||||
Icon: IconUsers,
|
||||
type: 'NUMBER',
|
||||
@ -59,7 +59,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldNumberMetadata>,
|
||||
{
|
||||
fieldId: 'address',
|
||||
fieldMetadataId: 'address',
|
||||
label: 'Address',
|
||||
Icon: IconMap,
|
||||
type: 'TEXT',
|
||||
@ -69,7 +69,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldTextMetadata>,
|
||||
{
|
||||
fieldId: 'idealCustomerProfile',
|
||||
fieldMetadataId: 'idealCustomerProfile',
|
||||
label: 'ICP',
|
||||
Icon: IconTarget,
|
||||
type: 'BOOLEAN',
|
||||
@ -78,7 +78,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldBooleanMetadata>,
|
||||
{
|
||||
fieldId: 'xUrl',
|
||||
fieldMetadataId: 'xUrl',
|
||||
label: 'Twitter',
|
||||
Icon: IconBrandX,
|
||||
type: 'URL',
|
||||
@ -88,7 +88,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
|
||||
},
|
||||
} satisfies FieldDefinition<FieldURLMetadata>,
|
||||
{
|
||||
fieldId: 'createdAt',
|
||||
fieldMetadataId: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendar,
|
||||
type: 'DATE',
|
||||
|
||||
@ -13,37 +13,37 @@ import { Company } from '~/generated/graphql';
|
||||
export const companyTableFilterDefinitions: FilterDefinitionByEntity<Company>[] =
|
||||
[
|
||||
{
|
||||
fieldId: 'name',
|
||||
fieldMetadataId: 'name',
|
||||
label: 'Name',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'employees',
|
||||
fieldMetadataId: 'employees',
|
||||
label: 'Employees',
|
||||
Icon: IconUsers,
|
||||
type: 'NUMBER',
|
||||
},
|
||||
{
|
||||
fieldId: 'domainName',
|
||||
fieldMetadataId: 'domainName',
|
||||
label: 'URL',
|
||||
Icon: IconLink,
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'address',
|
||||
fieldMetadataId: 'address',
|
||||
label: 'Address',
|
||||
Icon: IconMap,
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'createdAt',
|
||||
fieldMetadataId: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendarEvent,
|
||||
type: 'DATE',
|
||||
},
|
||||
{
|
||||
fieldId: 'accountOwnerId',
|
||||
fieldMetadataId: 'accountOwnerId',
|
||||
label: 'Account owner',
|
||||
Icon: IconUser,
|
||||
type: 'ENTITY',
|
||||
|
||||
@ -9,27 +9,27 @@ import { SortDefinition } from '@/ui/object/object-sort-dropdown/types/SortDefin
|
||||
|
||||
export const companyTableSortDefinitions: SortDefinition[] = [
|
||||
{
|
||||
fieldId: 'name',
|
||||
fieldMetadataId: 'name',
|
||||
label: 'Name',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
},
|
||||
{
|
||||
fieldId: 'employees',
|
||||
fieldMetadataId: 'employees',
|
||||
label: 'Employees',
|
||||
Icon: IconUsers,
|
||||
},
|
||||
{
|
||||
fieldId: 'domainName',
|
||||
fieldMetadataId: 'domainName',
|
||||
label: 'Url',
|
||||
Icon: IconLink,
|
||||
},
|
||||
{
|
||||
fieldId: 'address',
|
||||
fieldMetadataId: 'address',
|
||||
label: 'Address',
|
||||
Icon: IconMap,
|
||||
},
|
||||
{
|
||||
fieldId: 'createdAt',
|
||||
fieldMetadataId: 'createdAt',
|
||||
label: 'Creation',
|
||||
Icon: IconCalendarEvent,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user