Fix bug favorite optimistic rendering and opportunity prefill (#2633)

* Fix bug favorite optimistic rendering and opportunity prefill

* Fixes
This commit is contained in:
Charles Bochet
2023-11-22 11:43:40 +01:00
committed by GitHub
parent 10febd9aeb
commit 8f623ceb5c
6 changed files with 105 additions and 28 deletions

View File

@ -14,21 +14,6 @@ export const viewPrefillData = async (
.into(`${schemaName}.view`, ['name', 'objectMetadataId', 'type'])
.orIgnore()
.values([
{
name: 'All companies',
objectMetadataId: 'company',
type: 'table',
},
{
name: 'All people',
objectMetadataId: 'person',
type: 'table',
},
{
name: 'All opportunities',
objectMetadataId: 'company',
type: 'kanban',
},
{
name: 'All Companies',
objectMetadataId: objectMetadataMap['company'].id,
@ -41,7 +26,7 @@ export const viewPrefillData = async (
},
{
name: 'All Opportunities',
objectMetadataId: objectMetadataMap['company'].id,
objectMetadataId: objectMetadataMap['opportunity'].id,
type: 'kanban',
},
])

View File

@ -104,6 +104,58 @@ const opportunityMetadata = {
icon: 'IconBuildingSkyscraper',
isNullable: true,
},
{
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,
},
{
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: 'pointOfContactId',
label: 'Point of Contact ID (foreign key)',
targetColumnMap: {},
description: 'Foreign key for point of contact',
icon: undefined,
isNullable: true,
isSystem: true,
defaultValue: undefined,
},
{
isCustom: false,
isActive: true,
type: FieldMetadataType.UUID,
name: 'pipelineStepId',
label: 'Pipeline Step ID (foreign key)',
targetColumnMap: {},
description: 'Foreign key for pipeline step',
icon: undefined,
isNullable: true,
isSystem: true,
defaultValue: undefined,
},
],
};