diff --git a/.vscode/launch.json b/.vscode/launch.json index 2a13f9e89c..01879adbba 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -44,8 +44,8 @@ "nx", "run", "twenty-server:command", - "my-command", - "--my-parameter value", + "workspace:sync-metadata", + "-f", ], "outputCapture": "std", "internalConsoleOptions": "openOnSessionStart", diff --git a/packages/twenty-front/src/modules/activities/hooks/__tests__/useActivityTargetObjectRecords.test.tsx b/packages/twenty-front/src/modules/activities/hooks/__tests__/useActivityTargetObjectRecords.test.tsx index 2096f8c4a4..a0b73d4613 100644 --- a/packages/twenty-front/src/modules/activities/hooks/__tests__/useActivityTargetObjectRecords.test.tsx +++ b/packages/twenty-front/src/modules/activities/hooks/__tests__/useActivityTargetObjectRecords.test.tsx @@ -1,7 +1,7 @@ -import { ReactNode } from 'react'; import { gql, InMemoryCache } from '@apollo/client'; import { MockedProvider } from '@apollo/client/testing'; import { act, renderHook } from '@testing-library/react'; +import { ReactNode } from 'react'; import { RecoilRoot, useSetRecoilState } from 'recoil'; import { useActivityTargetObjectRecords } from '@/activities/hooks/useActivityTargetObjectRecords'; @@ -45,7 +45,7 @@ const activityNode = { company: { id: '89bb825c-171e-4bcc-9cf7-43448d6fb280', name: 'Airbnb', - domainName: 'airbnb.com', + domainName: { primaryLinkUrl: 'airbnb.com', primaryLinkLabel: '' }, }, person: null, activityId: '89bb825c-171e-4bcc-9cf7-43448d6fb230', @@ -90,7 +90,10 @@ cache.writeFragment({ company { id name - domainName + domainName { + primaryLinkLabel + primaryLinkUrl + } } person activityId diff --git a/packages/twenty-front/src/modules/activities/tasks/__stories__/TaskList.stories.tsx b/packages/twenty-front/src/modules/activities/tasks/__stories__/TaskList.stories.tsx index 4006fa33f7..7e75936003 100644 --- a/packages/twenty-front/src/modules/activities/tasks/__stories__/TaskList.stories.tsx +++ b/packages/twenty-front/src/modules/activities/tasks/__stories__/TaskList.stories.tsx @@ -52,7 +52,7 @@ const mockedActivities: Array = [ __typename: 'Company', id: '89bb825c-171e-4bcc-9cf7-43448d6fb280', name: 'Airbnb', - domainName: 'airbnb.com', + domainName: { primaryLinkUrl: 'airbnb.com', primaryLinkLabel: '' }, }, person: null, activityId: '89bb825c-171e-4bcc-9cf7-43448d6fb230', @@ -75,7 +75,7 @@ const mockedActivities: Array = [ __typename: 'Company', id: '89bb825c-171e-4bcc-9cf7-43448d6fb278', name: 'Aircall', - domainName: 'aircall.io', + domainName: { primaryLinkUrl: 'aircall.io', primaryLinkLabel: '' }, }, person: null, activityId: 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae', diff --git a/packages/twenty-front/src/modules/favorites/hooks/__mocks__/useFavorites.ts b/packages/twenty-front/src/modules/favorites/hooks/__mocks__/useFavorites.ts index 45dfba438c..7f243c29c0 100644 --- a/packages/twenty-front/src/modules/favorites/hooks/__mocks__/useFavorites.ts +++ b/packages/twenty-front/src/modules/favorites/hooks/__mocks__/useFavorites.ts @@ -143,7 +143,10 @@ export const mocks = [ primaryLinkLabel secondaryLinks } - domainName + domainName { + primaryLinkLabel + primaryLinkUrl + } annualRecurringRevenue { amountMicros currencyCode @@ -273,7 +276,10 @@ export const mocks = [ primaryLinkLabel secondaryLinks } - domainName + domainName { + primaryLinkLabel + primaryLinkUrl + } annualRecurringRevenue { amountMicros currencyCode diff --git a/packages/twenty-front/src/modules/favorites/utils/__utils__/mapFavorites.test.ts b/packages/twenty-front/src/modules/favorites/utils/__utils__/mapFavorites.test.ts index a64283b83b..06a98ff5cb 100644 --- a/packages/twenty-front/src/modules/favorites/utils/__utils__/mapFavorites.test.ts +++ b/packages/twenty-front/src/modules/favorites/utils/__utils__/mapFavorites.test.ts @@ -19,7 +19,7 @@ describe('mapFavorites', () => { company: { id: '4', name: 'My Company', - domainName: 'example.com', + domainName: { primaryLinkUrl: 'example.com', primaryLinkLabel: '' }, }, position: 1, }, diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/useGetObjectRecordIdentifierByNameSingular.test.tsx b/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/useGetObjectRecordIdentifierByNameSingular.test.tsx index 1a4c0e2cbf..3f3b8e0e5b 100644 --- a/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/useGetObjectRecordIdentifierByNameSingular.test.tsx +++ b/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/useGetObjectRecordIdentifierByNameSingular.test.tsx @@ -59,7 +59,10 @@ describe('useGetObjectRecordIdentifierByNameSingular', () => { rerender({ record: { id: 'recordId', - domainName: 'https://cool-company.com', + domainName: { + primaryLinkUrl: 'cool-company.com', + primaryLinkLabel: '', + }, }, objectNameSingular: 'company', }); diff --git a/packages/twenty-front/src/modules/object-metadata/utils/__tests__/mapFieldMetadataToGraphQLQuery.test.tsx b/packages/twenty-front/src/modules/object-metadata/utils/__tests__/mapFieldMetadataToGraphQLQuery.test.tsx index fa54aa7950..565f6f4cd2 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/__tests__/mapFieldMetadataToGraphQLQuery.test.tsx +++ b/packages/twenty-front/src/modules/object-metadata/utils/__tests__/mapFieldMetadataToGraphQLQuery.test.tsx @@ -60,7 +60,10 @@ linkedinLink primaryLinkLabel secondaryLinks } -domainName +domainName { + primaryLinkLabel + primaryLinkUrl +} annualRecurringRevenue { amountMicros @@ -135,7 +138,10 @@ linkedinLink primaryLinkLabel secondaryLinks } -domainName +domainName { + primaryLinkLabel + primaryLinkUrl +} annualRecurringRevenue { amountMicros diff --git a/packages/twenty-front/src/modules/object-metadata/utils/__tests__/mapObjectMetadataToGraphQLQuery.test.tsx b/packages/twenty-front/src/modules/object-metadata/utils/__tests__/mapObjectMetadataToGraphQLQuery.test.tsx index fac523a610..bff1853b8b 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/__tests__/mapObjectMetadataToGraphQLQuery.test.tsx +++ b/packages/twenty-front/src/modules/object-metadata/utils/__tests__/mapObjectMetadataToGraphQLQuery.test.tsx @@ -60,7 +60,10 @@ linkedinLink primaryLinkLabel secondaryLinks } -domainName +domainName { + primaryLinkLabel + primaryLinkUrl +} annualRecurringRevenue { amountMicros 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 9953c57674..eff84e0504 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts +++ b/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts @@ -2940,7 +2940,7 @@ export const getObjectMetadataItemsMock = () => { { __typename: 'field', id: '20202020-5e4e-4007-a630-8a2617914889', - type: 'TEXT', + type: 'LINKS', name: 'domainName', label: 'Domain Name', description: diff --git a/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useFindManyRecords.ts b/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useFindManyRecords.ts index 1ed7b456fc..ba6ec43898 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useFindManyRecords.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useFindManyRecords.ts @@ -74,7 +74,10 @@ export const query = gql` primaryLinkLabel primaryLinkUrl } - domainName + domainName { + primaryLinkLabel + primaryLinkUrl + } annualRecurringRevenue { amountMicros currencyCode diff --git a/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/useToggleEditOnlyInput.test.tsx b/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/useToggleEditOnlyInput.test.tsx index acc06e7334..6657492741 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/useToggleEditOnlyInput.test.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/useToggleEditOnlyInput.test.tsx @@ -36,7 +36,10 @@ const mocks: MockedResponse[] = [ primaryLinkLabel secondaryLinks } - domainName + domainName { + primaryLinkLabel + primaryLinkUrl + } annualRecurringRevenue { amountMicros currencyCode diff --git a/packages/twenty-front/src/modules/object-record/spreadsheet-import/__tests__/useOpenObjectRecordsSpreasheetImportDialog.test.tsx b/packages/twenty-front/src/modules/object-record/spreadsheet-import/__tests__/useOpenObjectRecordsSpreasheetImportDialog.test.tsx index 712ad24aa3..bc1e927d8b 100644 --- a/packages/twenty-front/src/modules/object-record/spreadsheet-import/__tests__/useOpenObjectRecordsSpreasheetImportDialog.test.tsx +++ b/packages/twenty-front/src/modules/object-record/spreadsheet-import/__tests__/useOpenObjectRecordsSpreasheetImportDialog.test.tsx @@ -36,7 +36,10 @@ const companyMocks = [ primaryLinkLabel secondaryLinks } - domainName + domainName { + primaryLinkLabel + primaryLinkUrl + } annualRecurringRevenue { amountMicros currencyCode diff --git a/packages/twenty-front/src/modules/search/hooks/__mocks__/useFilteredSearchEntityQuery.ts b/packages/twenty-front/src/modules/search/hooks/__mocks__/useFilteredSearchEntityQuery.ts index 28c49a9dda..0031c008dd 100644 --- a/packages/twenty-front/src/modules/search/hooks/__mocks__/useFilteredSearchEntityQuery.ts +++ b/packages/twenty-front/src/modules/search/hooks/__mocks__/useFilteredSearchEntityQuery.ts @@ -70,7 +70,10 @@ export const query = gql` primaryLinkLabel primaryLinkUrl } - domainName + domainName { + primaryLinkLabel + primaryLinkUrl + } annualRecurringRevenue { amountMicros currencyCode diff --git a/packages/twenty-server/src/engine/workspace-manager/demo-objects-prefill-data/company.ts b/packages/twenty-server/src/engine/workspace-manager/demo-objects-prefill-data/company.ts index f1cea39e37..f404bd8062 100644 --- a/packages/twenty-server/src/engine/workspace-manager/demo-objects-prefill-data/company.ts +++ b/packages/twenty-server/src/engine/workspace-manager/demo-objects-prefill-data/company.ts @@ -2,6 +2,7 @@ import { EntityManager } from 'typeorm'; import { companiesDemo } from 'src/engine/workspace-manager/demo-objects-prefill-data/companies-demo.json'; +// TO DO export const companyPrefillDemoData = async ( entityManager: EntityManager, schemaName: string, diff --git a/packages/twenty-server/test/company.e2e-spec.ts b/packages/twenty-server/test/company.e2e-spec.ts index 1a52998601..6e0432af85 100644 --- a/packages/twenty-server/test/company.e2e-spec.ts +++ b/packages/twenty-server/test/company.e2e-spec.ts @@ -223,7 +223,10 @@ describe('CompanyResolver (e2e)', () => { updateOneCompany(data: $data, where: $where) { id name - domainName + domainName { + primaryLinkLabek + primaryLinkUrl + } address { addressCity }