Add KanbanFieldMetadataId on View standard object (#4604)
* Add KanbanFieldMetadataId on View standard object * Deprecate Pipeline step * Fix * Use Constants instead of raw ids * Fix * Fix query runner * Fix according to review * Fix tests * Fix tests * Fix tests
This commit is contained in:
@ -15,7 +15,6 @@ export enum CoreObjectNameSingular {
|
||||
MessageThread = 'messageThread',
|
||||
Opportunity = 'opportunity',
|
||||
Person = 'person',
|
||||
PipelineStep = 'pipelineStep',
|
||||
View = 'view',
|
||||
ViewField = 'viewField',
|
||||
ViewFilter = 'viewFilter',
|
||||
|
||||
@ -150,7 +150,6 @@ personId
|
||||
pointOfContactId
|
||||
updatedAt
|
||||
companyId
|
||||
pipelineStepId
|
||||
probability
|
||||
closeDate
|
||||
amount
|
||||
|
||||
@ -78,7 +78,6 @@ personId
|
||||
pointOfContactId
|
||||
updatedAt
|
||||
companyId
|
||||
pipelineStepId
|
||||
probability
|
||||
closeDate
|
||||
amount
|
||||
@ -106,7 +105,6 @@ personId
|
||||
pointOfContactId
|
||||
updatedAt
|
||||
companyId
|
||||
pipelineStepId
|
||||
probability
|
||||
closeDate
|
||||
amount
|
||||
|
||||
@ -401,23 +401,6 @@ export const getObjectMetadataItemsMock = () => {
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-0a2e-4676-8011-3fdb2c30d7f8',
|
||||
type: 'UUID',
|
||||
name: 'pipelineStepId',
|
||||
label: 'Pipeline Step ID (foreign key)',
|
||||
description: 'Foreign key for pipeline step',
|
||||
icon: null,
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-30T11:13:15.308Z',
|
||||
updatedAt: '2023-11-30T11:13:15.308Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-3b9c-4e58-a3d2-c617d3b596b1',
|
||||
@ -436,32 +419,63 @@ export const getObjectMetadataItemsMock = () => {
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-0a2e-4676-8011-3fdb2c30c258',
|
||||
type: 'RELATION',
|
||||
name: 'pipelineStep',
|
||||
label: 'Pipeline Step',
|
||||
description: 'Opportunity pipeline step',
|
||||
icon: 'IconKanban',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-30T11:13:15.308Z',
|
||||
updatedAt: '2023-11-30T11:13:15.308Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: {
|
||||
__typename: 'relation',
|
||||
id: 'dfb44970-3e09-49f2-9f1d-51c8c451b8f5',
|
||||
relationType: 'ONE_TO_MANY',
|
||||
fromObjectMetadata: {
|
||||
__typename: 'object',
|
||||
id: '20202020-1029-4661-9e91-83bad932bdcd',
|
||||
dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1',
|
||||
nameSingular: 'pipelineStep',
|
||||
namePlural: 'pipelineSteps',
|
||||
__typename: 'fieldEdge',
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-46cc-42bb-90d5-c724921a012d',
|
||||
type: 'SELECT',
|
||||
name: 'stage',
|
||||
label: 'Stage',
|
||||
description: 'Opportunity stage',
|
||||
icon: 'IconProgressCheck',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
createdAt: '2024-03-21T16:48:40.384Z',
|
||||
updatedAt: '2024-03-21T16:48:40.384Z',
|
||||
defaultValue: {
|
||||
value: 'NEW',
|
||||
},
|
||||
fromFieldMetadataId: '20202020-22c4-443a-b114-43c97dda5867',
|
||||
options: [
|
||||
{
|
||||
id: '20202020-aa3b-4c0b-bd90-9d071e3b9bf2',
|
||||
color: 'red',
|
||||
label: 'New',
|
||||
value: 'NEW',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: '20202020-8f9b-4bc3-b0a0-ce6a5085c1cf',
|
||||
color: 'purple',
|
||||
label: 'Screening',
|
||||
value: 'SCREENING',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: '20202020-9797-448d-81e4-49b055a1d19b',
|
||||
color: 'sky',
|
||||
label: 'Meeting',
|
||||
value: 'MEETING',
|
||||
position: 2,
|
||||
},
|
||||
{
|
||||
id: '20202020-d542-479c-bc88-3c6d4ee78d09',
|
||||
color: 'turquoise',
|
||||
label: 'Proposal',
|
||||
value: 'PROPOSAL',
|
||||
position: 3,
|
||||
},
|
||||
{
|
||||
id: '20202020-b69a-4c9c-ac16-adcba0ec972d',
|
||||
color: 'yellow',
|
||||
label: 'Customer',
|
||||
value: 'CUSTOMER',
|
||||
position: 4,
|
||||
},
|
||||
],
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -3537,155 +3551,6 @@ export const getObjectMetadataItemsMock = () => {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
__typename: 'object',
|
||||
id: '20202020-1029-4661-9e91-83bad932bdcd',
|
||||
dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1',
|
||||
nameSingular: 'pipelineStep',
|
||||
namePlural: 'pipelineSteps',
|
||||
labelSingular: 'Pipeline Step',
|
||||
labelPlural: 'Pipeline Steps',
|
||||
description: 'A pipeline step',
|
||||
icon: 'IconLayoutKanban',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
createdAt: '2023-11-30T11:13:15.206Z',
|
||||
updatedAt: '2023-11-30T11:13:15.206Z',
|
||||
fields: [
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-f294-430e-b800-3a411fc05ad3',
|
||||
type: 'TEXT',
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
description: 'Pipeline Step name',
|
||||
icon: 'IconCurrencyDollar',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-30T11:13:15.337Z',
|
||||
updatedAt: '2023-11-30T11:13:15.337Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-039a-4fbd-b4c1-66dfa9e4bd3f',
|
||||
type: 'UUID',
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
description: null,
|
||||
icon: null,
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-30T11:13:15.337Z',
|
||||
updatedAt: '2023-11-30T11:13:15.337Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-816f-4861-9b36-4a2f8ae2791c',
|
||||
type: 'DATE_TIME',
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
description: null,
|
||||
icon: 'IconCalendar',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-30T11:13:15.337Z',
|
||||
updatedAt: '2023-11-30T11:13:15.337Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-22c4-443a-b114-43c97dda5867',
|
||||
type: 'RELATION',
|
||||
name: 'opportunities',
|
||||
label: 'Opportunities',
|
||||
description: 'Opportunities linked to the step.',
|
||||
icon: 'IconTargetArrow',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-30T11:13:15.337Z',
|
||||
updatedAt: '2023-11-30T11:13:15.337Z',
|
||||
fromRelationMetadata: {
|
||||
__typename: 'relation',
|
||||
id: 'dfb44970-3e09-49f2-9f1d-51c8c451b8f5',
|
||||
relationType: 'ONE_TO_MANY',
|
||||
toObjectMetadata: {
|
||||
__typename: 'object',
|
||||
id: '20202020-cae9-4ff4-9579-f7d9fe44c937',
|
||||
dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1',
|
||||
nameSingular: 'opportunity',
|
||||
namePlural: 'opportunities',
|
||||
},
|
||||
toFieldMetadataId: '20202020-0a2e-4676-8011-3fdb2c30c258',
|
||||
},
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-6296-4cab-aafb-121ef5822b13',
|
||||
type: 'NUMBER',
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
description: 'Pipeline Step position',
|
||||
icon: 'IconHierarchy2',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-30T11:13:15.337Z',
|
||||
updatedAt: '2023-11-30T11:13:15.337Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-5b93-4b28-8c45-7988ea68f91b',
|
||||
type: 'TEXT',
|
||||
name: 'color',
|
||||
label: 'Color',
|
||||
description: 'Pipeline Step color',
|
||||
icon: 'IconColorSwatch',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-30T11:13:15.337Z',
|
||||
updatedAt: '2023-11-30T11:13:15.337Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
{
|
||||
__typename: 'field',
|
||||
id: '20202020-2d73-4829-b774-522c2f5627d7',
|
||||
type: 'DATE_TIME',
|
||||
name: 'updatedAt',
|
||||
label: 'Update date',
|
||||
description: null,
|
||||
icon: 'IconCalendar',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-30T11:13:15.337Z',
|
||||
updatedAt: '2023-11-30T11:13:15.337Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// Todo fix typing here (the backend is not in sync with the frontend)
|
||||
|
||||
Reference in New Issue
Block a user