From 27782619311af250f0b3eadf9ea45e9e9c33e290 Mon Sep 17 00:00:00 2001 From: Nabhag8848 Date: Wed, 2 Oct 2024 13:09:50 +0530 Subject: [PATCH 1/3] fix: created by value --- .../standard-objects-prefill-data/company.ts | 10 +++++----- .../standard-objects-prefill-data/person.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/twenty-server/src/engine/workspace-manager/standard-objects-prefill-data/company.ts b/packages/twenty-server/src/engine/workspace-manager/standard-objects-prefill-data/company.ts index 2f3966e1043e..6e1a2958d80c 100644 --- a/packages/twenty-server/src/engine/workspace-manager/standard-objects-prefill-data/company.ts +++ b/packages/twenty-server/src/engine/workspace-manager/standard-objects-prefill-data/company.ts @@ -45,7 +45,7 @@ export const companyPrefillData = async ( position: 1, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', }, { id: QONTO_ID, @@ -61,7 +61,7 @@ export const companyPrefillData = async ( position: 2, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', }, { id: STRIPE_ID, @@ -77,7 +77,7 @@ export const companyPrefillData = async ( position: 3, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', }, { id: FIGMA_ID, @@ -93,7 +93,7 @@ export const companyPrefillData = async ( position: 4, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', }, { id: NOTION_ID, @@ -109,7 +109,7 @@ export const companyPrefillData = async ( position: 5, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', }, ]) .returning('*') diff --git a/packages/twenty-server/src/engine/workspace-manager/standard-objects-prefill-data/person.ts b/packages/twenty-server/src/engine/workspace-manager/standard-objects-prefill-data/person.ts index ec07c61f15b2..22543de88cd9 100644 --- a/packages/twenty-server/src/engine/workspace-manager/standard-objects-prefill-data/person.ts +++ b/packages/twenty-server/src/engine/workspace-manager/standard-objects-prefill-data/person.ts @@ -42,7 +42,7 @@ export const personPrefillData = async ( position: 1, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', phonesPrimaryPhoneNumber: '1234567890', phonesPrimaryPhoneCountryCode: '+1', companyId: AIRBNB_ID, @@ -57,7 +57,7 @@ export const personPrefillData = async ( position: 2, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', phonesPrimaryPhoneNumber: '677118822', phonesPrimaryPhoneCountryCode: '+33', companyId: QONTO_ID, @@ -72,7 +72,7 @@ export const personPrefillData = async ( position: 3, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', phonesPrimaryPhoneNumber: '987625341', phonesPrimaryPhoneCountryCode: '+1', companyId: STRIPE_ID, @@ -87,7 +87,7 @@ export const personPrefillData = async ( position: 4, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', phonesPrimaryPhoneNumber: '09882261', phonesPrimaryPhoneCountryCode: '+1', companyId: FIGMA_ID, @@ -102,7 +102,7 @@ export const personPrefillData = async ( position: 5, createdBySource: 'MANUAL', createdByWorkspaceMemberId: null, - createdByName: 'System', + createdByName: 'Twenty (Sample data)', phonesPrimaryPhoneNumber: '88226173', phonesPrimaryPhoneCountryCode: '+1', companyId: NOTION_ID, From 564d03d6f2b94182626f67f6271f4bc085def590 Mon Sep 17 00:00:00 2001 From: Nabhag8848 Date: Wed, 2 Oct 2024 15:18:01 +0530 Subject: [PATCH 2/3] fix: having twenty logo --- .../meta-types/display/components/ActorFieldDisplay.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/ActorFieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/ActorFieldDisplay.tsx index 129d0ebdbef7..0b25ac4fdfa7 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/ActorFieldDisplay.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/ActorFieldDisplay.tsx @@ -1,5 +1,6 @@ import { useActorFieldDisplay } from '@/object-record/record-field/meta-types/hooks/useActorFieldDisplay'; import { ActorDisplay } from '@/ui/field/display/components/ActorDisplay'; +import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceLogo'; import { isNonEmptyString } from '@sniptt/guards'; export const ActorFieldDisplay = () => { @@ -18,7 +19,11 @@ export const ActorFieldDisplay = () => { ); From d7d012650e484e807561fbf3c470e359ab3ad712 Mon Sep 17 00:00:00 2001 From: Nabhag8848 Date: Wed, 2 Oct 2024 15:25:02 +0530 Subject: [PATCH 3/3] fix: to have optional chaning --- .../meta-types/display/components/ActorFieldDisplay.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/ActorFieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/ActorFieldDisplay.tsx index 0b25ac4fdfa7..aa11e2a2cb21 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/ActorFieldDisplay.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/ActorFieldDisplay.tsx @@ -20,7 +20,7 @@ export const ActorFieldDisplay = () => { name={name} source={fieldValue.source} avatarUrl={ - fieldValue.workspaceMemberId + fieldValue?.workspaceMemberId ? fieldValue.workspaceMember?.avatarUrl : DEFAULT_WORKSPACE_LOGO }