diff --git a/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts b/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts index bf102d994f..457f94abc5 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts +++ b/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts @@ -1,5 +1,7 @@ import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; +export const COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID = '39403bee-314b-4f14-bc91-70d500397517'; + export const getObjectMetadataItemsMock = () => { const mockArray = [ { @@ -1657,7 +1659,7 @@ export const getObjectMetadataItemsMock = () => { "isSystem": false, "createdAt": "2024-07-31T10:44:41.328Z", "updatedAt": "2024-07-31T10:44:41.328Z", - "labelIdentifierFieldMetadataId": "39403bee-314b-4f14-bc91-70d500397517", + "labelIdentifierFieldMetadataId": COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID, "imageIdentifierFieldMetadataId": null, "fields": [ { @@ -2118,7 +2120,7 @@ export const getObjectMetadataItemsMock = () => { }, { "__typename": "field", - "id": "39403bee-314b-4f14-bc91-70d500397517", + "id": COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID, "type": "TEXT", "name": "name", "label": "Name", diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockColumnDefinitions.ts b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockColumnDefinitions.ts index da2ac2e853..5e4e4377de 100644 --- a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockColumnDefinitions.ts +++ b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockColumnDefinitions.ts @@ -1,3 +1,4 @@ +import { COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID } from '@/object-metadata/utils/getObjectMetadataItemsMock'; import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata'; import { ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition'; import { filterAvailableTableColumns } from '@/object-record/utils/filterAvailableTableColumns'; @@ -41,7 +42,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = ( }, { position: 2, - fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', + fieldMetadataId: COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID, label: 'Name', size: 100, type: FieldMetadataType.Text, diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockFilterDefinitions.ts b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockFilterDefinitions.ts index 6452a66007..ab67214dd3 100644 --- a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockFilterDefinitions.ts +++ b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockFilterDefinitions.ts @@ -1,3 +1,4 @@ +import { COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID } from '@/object-metadata/utils/getObjectMetadataItemsMock'; import { FilterDefinition } from '@/object-record/object-filter-dropdown/types/FilterDefinition'; export const SIGN_IN_BACKGROUND_MOCK_FILTER_DEFINITIONS = [ @@ -14,7 +15,7 @@ export const SIGN_IN_BACKGROUND_MOCK_FILTER_DEFINITIONS = [ type: 'NUMBER', }, { - fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', + fieldMetadataId: COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID, label: 'Name', iconName: 'IconBuildingSkyscraper', type: 'TEXT', diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockSortDefinitions.ts b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockSortDefinitions.ts index 598e6e4d2a..24adc014bb 100644 --- a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockSortDefinitions.ts +++ b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockSortDefinitions.ts @@ -1,3 +1,4 @@ +import { COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID } from '@/object-metadata/utils/getObjectMetadataItemsMock'; import { SortDefinition } from '@/object-record/object-sort-dropdown/types/SortDefinition'; export const SIGN_IN_BACKGROUND_MOCK_SORT_DEFINITIONS = [ @@ -12,7 +13,7 @@ export const SIGN_IN_BACKGROUND_MOCK_SORT_DEFINITIONS = [ iconName: 'IconUsers', }, { - fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', + fieldMetadataId: COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID, label: 'Name', iconName: 'IconBuildingSkyscraper', }, diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockViewFields.ts b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockViewFields.ts index c2ee7a7932..dabbe24343 100644 --- a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockViewFields.ts +++ b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockViewFields.ts @@ -1,3 +1,4 @@ +import { COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID } from '@/object-metadata/utils/getObjectMetadataItemsMock'; import { ViewField } from '@/views/types/ViewField'; export const SIGN_IN_BACKGROUND_MOCK_VIEW_FIELDS = [ @@ -59,7 +60,7 @@ export const SIGN_IN_BACKGROUND_MOCK_VIEW_FIELDS = [ { __typename: 'ViewField', id: 'cafacdc8-cbfc-4545-8242-94787f144ace', - fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', + fieldMetadataId: COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID, size: 180, createdAt: '2023-11-23T15:38:03.706Z', viewId: '20202020-2441-4424-8163-4002c523d415',