Fix favorite seeds and prefill
This commit is contained in:
@ -45,7 +45,6 @@ export const useFavorites = ({
|
||||
input: {
|
||||
[`${targetObjectName}Id`]: favoriteTargetObjectId,
|
||||
position: favorites.length + 1,
|
||||
// workspaceMember: currentWorkspaceMember?.id,
|
||||
workspaceMemberId: currentWorkspaceMember?.id,
|
||||
},
|
||||
},
|
||||
@ -65,8 +64,8 @@ export const useFavorites = ({
|
||||
[
|
||||
apolloClient,
|
||||
createOneMutation,
|
||||
currentWorkspaceMember?.id,
|
||||
favoriteTargetObjectMetadataItem,
|
||||
currentWorkspaceMember,
|
||||
favoriteTargetObjectMetadataItem?.nameSingular,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ export enum SeedCompanyFieldMetadataIds {
|
||||
DomainName = '20202020-5e4e-4007-a630-8a2617914889',
|
||||
Address = '20202020-ad10-4117-a039-3f04b7a5f939',
|
||||
Employees = '20202020-7fbd-41ad-b64d-25a15ff62f04',
|
||||
LinkedinUrl = '20202020-a61d-4b78-b998-3fd88b4f73a1',
|
||||
LinkedinLink = '20202020-a61d-4b78-b998-3fd88b4f73a1',
|
||||
XUrl = '20202020-46e3-479a-b8f4-77137c74daa6',
|
||||
AnnualRecurringRevenue = '20202020-4a5a-466f-92d9-c3870d9502a9',
|
||||
IdealCustomerProfile = '20202020-9e9f-4235-98b2-c76f3e2d281e',
|
||||
@ -186,7 +186,7 @@ export const seedCompanyFieldMetadata = async (
|
||||
defaultValue: undefined,
|
||||
},
|
||||
{
|
||||
id: SeedCompanyFieldMetadataIds.LinkedinUrl,
|
||||
id: SeedCompanyFieldMetadataIds.LinkedinLink,
|
||||
objectMetadataId: SeedObjectMetadataIds.Company,
|
||||
isCustom: false,
|
||||
workspaceId: SeedWorkspaceId,
|
||||
|
||||
@ -151,7 +151,7 @@ export const seedFavoriteFieldMetadata = async (
|
||||
targetColumnMap: {},
|
||||
description: 'Foreign key for workspace member',
|
||||
icon: undefined,
|
||||
isNullable: true,
|
||||
isNullable: false,
|
||||
isSystem: true,
|
||||
defaultValue: undefined,
|
||||
},
|
||||
|
||||
@ -15,7 +15,7 @@ export enum SeedPersonFieldMetadataIds {
|
||||
LastName = '20202020-b784-458a-869d-6c53fa85483d',
|
||||
|
||||
Email = '20202020-8a96-4e4b-86fd-ea126530e0c1',
|
||||
LinkedinUrl = '20202020-dcf6-445a-b543-37e55de43c25',
|
||||
LinkedinLink = '20202020-dcf6-445a-b543-37e55de43c25',
|
||||
XUrl = '20202020-a3a7-4f63-9303-10226f6055be',
|
||||
JobTitle = '20202020-3b86-413e-ab56-0ebd1a583ff3',
|
||||
Phone = '20202020-486f-45f9-bbdf-aac18b1831c0',
|
||||
@ -169,7 +169,7 @@ export const seedPersonFieldMetadata = async (
|
||||
defaultValue: undefined,
|
||||
},
|
||||
{
|
||||
id: SeedPersonFieldMetadataIds.LinkedinUrl,
|
||||
id: SeedPersonFieldMetadataIds.LinkedinLink,
|
||||
objectMetadataId: SeedObjectMetadataIds.Person,
|
||||
isCustom: false,
|
||||
workspaceId: SeedWorkspaceId,
|
||||
|
||||
@ -103,7 +103,7 @@ export const viewPrefillData = async (
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
fieldMetadataId: objectMetadataMap['companyV2'].fields['linkedinUrl'],
|
||||
fieldMetadataId: objectMetadataMap['companyV2'].fields['linkedinLink'],
|
||||
viewId: viewIdMap['All Companies (V2)'],
|
||||
position: 5,
|
||||
isVisible: true,
|
||||
@ -167,14 +167,14 @@ export const viewPrefillData = async (
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
fieldMetadataId: objectMetadataMap['personV2'].fields['linkedinUrl'],
|
||||
fieldMetadataId: objectMetadataMap['personV2'].fields['linkedinLink'],
|
||||
viewId: viewIdMap['All People (V2)'],
|
||||
position: 7,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
fieldMetadataId: objectMetadataMap['personV2'].fields['xUrl'],
|
||||
fieldMetadataId: objectMetadataMap['personV2'].fields['xLink'],
|
||||
viewId: viewIdMap['All People (V2)'],
|
||||
position: 8,
|
||||
isVisible: true,
|
||||
|
||||
@ -31,12 +31,10 @@ const favoriteMetadata = {
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'workspaceMember',
|
||||
label: 'Workspace Member',
|
||||
targetColumnMap: {
|
||||
value: 'workspaceMemberId',
|
||||
},
|
||||
targetColumnMap: {},
|
||||
description: 'Favorite workspace member',
|
||||
icon: 'IconCircleUser',
|
||||
isNullable: false,
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
@ -44,12 +42,10 @@ const favoriteMetadata = {
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
targetColumnMap: {
|
||||
value: 'personId',
|
||||
},
|
||||
targetColumnMap: {},
|
||||
description: 'Favorite person',
|
||||
icon: 'IconUser',
|
||||
isNullable: false,
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
@ -57,12 +53,49 @@ const favoriteMetadata = {
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
targetColumnMap: {
|
||||
value: 'companyId',
|
||||
},
|
||||
targetColumnMap: {},
|
||||
description: 'Favorite company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'workspaceMemberId',
|
||||
label: 'Workspace Member ID (foreign key)',
|
||||
targetColumnMap: {},
|
||||
description: 'Foreign key for workspace member',
|
||||
icon: undefined,
|
||||
isNullable: false,
|
||||
isSystem: true,
|
||||
defaultValue: undefined,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'personId',
|
||||
label: 'Person ID (foreign key)',
|
||||
targetColumnMap: {},
|
||||
description: 'Foreign key for person',
|
||||
icon: undefined,
|
||||
isNullable: true,
|
||||
isSystem: true,
|
||||
defaultValue: undefined,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'companyId',
|
||||
label: 'Company ID (foreign key)',
|
||||
targetColumnMap: {},
|
||||
description: 'Foreign key for company',
|
||||
icon: undefined,
|
||||
isNullable: true,
|
||||
isSystem: true,
|
||||
defaultValue: undefined,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@ -54,10 +54,11 @@ const personMetadata = {
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: FieldMetadataType.LINK,
|
||||
name: 'linkedinUrl',
|
||||
name: 'linkedinLink',
|
||||
label: 'Linkedin',
|
||||
targetColumnMap: {
|
||||
value: 'linkedinUrl',
|
||||
label: 'linkedinLinkLabel',
|
||||
url: 'linkedinLinkUrl',
|
||||
},
|
||||
description: 'Contact’s Linkedin account',
|
||||
icon: 'IconBrandLinkedin',
|
||||
@ -67,10 +68,11 @@ const personMetadata = {
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: FieldMetadataType.LINK,
|
||||
name: 'xUrl',
|
||||
name: 'xLink',
|
||||
label: 'X',
|
||||
targetColumnMap: {
|
||||
value: 'xUrl',
|
||||
label: 'xLinkLabel',
|
||||
url: 'xLinkUrl',
|
||||
},
|
||||
description: 'Contact’s X/Twitter account',
|
||||
icon: 'IconUser',
|
||||
|
||||
Reference in New Issue
Block a user