Page layout various fixes (#17996)
## Context - Add missing fields widget and FIELDS_WIDGET view for workflow run and workflow version standard objects - Fix FIELDS_WIDGET configuration fieldId universalIdentifier not being converted to id when migration is executed.
This commit is contained in:
+173
-100
@@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`getStandardObjectMetadataRelatedEntityIds should return standard object metadata related entity ids 1`] = `
|
||||
{
|
||||
@@ -2038,7 +2038,7 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
|
||||
"id": "00000000-0000-0000-0000-000000000601",
|
||||
},
|
||||
},
|
||||
"id": "00000000-0000-0000-0000-000000000623",
|
||||
"id": "00000000-0000-0000-0000-000000000635",
|
||||
"views": {
|
||||
"allWorkflowRuns": {
|
||||
"id": "00000000-0000-0000-0000-000000000622",
|
||||
@@ -2065,73 +2065,146 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
|
||||
},
|
||||
"viewGroups": {},
|
||||
},
|
||||
"workflowRunRecordPageFields": {
|
||||
"id": "00000000-0000-0000-0000-000000000634",
|
||||
"viewFieldGroups": {
|
||||
"additional": {
|
||||
"id": "00000000-0000-0000-0000-000000000632",
|
||||
},
|
||||
"general": {
|
||||
"id": "00000000-0000-0000-0000-000000000631",
|
||||
},
|
||||
"other": {
|
||||
"id": "00000000-0000-0000-0000-000000000633",
|
||||
},
|
||||
},
|
||||
"viewFields": {
|
||||
"createdAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000629",
|
||||
},
|
||||
"createdBy": {
|
||||
"id": "00000000-0000-0000-0000-000000000630",
|
||||
},
|
||||
"endedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000628",
|
||||
},
|
||||
"name": {
|
||||
"id": "00000000-0000-0000-0000-000000000623",
|
||||
},
|
||||
"startedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000627",
|
||||
},
|
||||
"status": {
|
||||
"id": "00000000-0000-0000-0000-000000000624",
|
||||
},
|
||||
"workflow": {
|
||||
"id": "00000000-0000-0000-0000-000000000625",
|
||||
},
|
||||
"workflowVersion": {
|
||||
"id": "00000000-0000-0000-0000-000000000626",
|
||||
},
|
||||
},
|
||||
"viewGroups": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
"workflowVersion": {
|
||||
"fields": {
|
||||
"createdAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000625",
|
||||
},
|
||||
"deletedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000627",
|
||||
},
|
||||
"favorites": {
|
||||
"id": "00000000-0000-0000-0000-000000000635",
|
||||
},
|
||||
"id": {
|
||||
"id": "00000000-0000-0000-0000-000000000624",
|
||||
},
|
||||
"name": {
|
||||
"id": "00000000-0000-0000-0000-000000000628",
|
||||
},
|
||||
"position": {
|
||||
"id": "00000000-0000-0000-0000-000000000632",
|
||||
},
|
||||
"runs": {
|
||||
"id": "00000000-0000-0000-0000-000000000633",
|
||||
},
|
||||
"searchVector": {
|
||||
"id": "00000000-0000-0000-0000-000000000637",
|
||||
},
|
||||
"status": {
|
||||
"id": "00000000-0000-0000-0000-000000000631",
|
||||
"deletedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000639",
|
||||
},
|
||||
"steps": {
|
||||
"id": "00000000-0000-0000-0000-000000000634",
|
||||
"favorites": {
|
||||
"id": "00000000-0000-0000-0000-000000000647",
|
||||
},
|
||||
"timelineActivities": {
|
||||
"id": {
|
||||
"id": "00000000-0000-0000-0000-000000000636",
|
||||
},
|
||||
"name": {
|
||||
"id": "00000000-0000-0000-0000-000000000640",
|
||||
},
|
||||
"position": {
|
||||
"id": "00000000-0000-0000-0000-000000000644",
|
||||
},
|
||||
"runs": {
|
||||
"id": "00000000-0000-0000-0000-000000000645",
|
||||
},
|
||||
"searchVector": {
|
||||
"id": "00000000-0000-0000-0000-000000000649",
|
||||
},
|
||||
"status": {
|
||||
"id": "00000000-0000-0000-0000-000000000643",
|
||||
},
|
||||
"steps": {
|
||||
"id": "00000000-0000-0000-0000-000000000646",
|
||||
},
|
||||
"timelineActivities": {
|
||||
"id": "00000000-0000-0000-0000-000000000648",
|
||||
},
|
||||
"trigger": {
|
||||
"id": "00000000-0000-0000-0000-000000000630",
|
||||
"id": "00000000-0000-0000-0000-000000000642",
|
||||
},
|
||||
"updatedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000626",
|
||||
"id": "00000000-0000-0000-0000-000000000638",
|
||||
},
|
||||
"workflow": {
|
||||
"id": "00000000-0000-0000-0000-000000000629",
|
||||
"id": "00000000-0000-0000-0000-000000000641",
|
||||
},
|
||||
},
|
||||
"id": "00000000-0000-0000-0000-000000000644",
|
||||
"id": "00000000-0000-0000-0000-000000000665",
|
||||
"views": {
|
||||
"allWorkflowVersions": {
|
||||
"id": "00000000-0000-0000-0000-000000000643",
|
||||
"id": "00000000-0000-0000-0000-000000000655",
|
||||
"viewFieldGroups": {},
|
||||
"viewFields": {
|
||||
"name": {
|
||||
"id": "00000000-0000-0000-0000-000000000638",
|
||||
"id": "00000000-0000-0000-0000-000000000650",
|
||||
},
|
||||
"runs": {
|
||||
"id": "00000000-0000-0000-0000-000000000642",
|
||||
"id": "00000000-0000-0000-0000-000000000654",
|
||||
},
|
||||
"status": {
|
||||
"id": "00000000-0000-0000-0000-000000000640",
|
||||
"id": "00000000-0000-0000-0000-000000000652",
|
||||
},
|
||||
"updatedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000641",
|
||||
"id": "00000000-0000-0000-0000-000000000653",
|
||||
},
|
||||
"workflow": {
|
||||
"id": "00000000-0000-0000-0000-000000000639",
|
||||
"id": "00000000-0000-0000-0000-000000000651",
|
||||
},
|
||||
},
|
||||
"viewGroups": {},
|
||||
},
|
||||
"workflowVersionRecordPageFields": {
|
||||
"id": "00000000-0000-0000-0000-000000000664",
|
||||
"viewFieldGroups": {
|
||||
"additional": {
|
||||
"id": "00000000-0000-0000-0000-000000000662",
|
||||
},
|
||||
"general": {
|
||||
"id": "00000000-0000-0000-0000-000000000661",
|
||||
},
|
||||
"other": {
|
||||
"id": "00000000-0000-0000-0000-000000000663",
|
||||
},
|
||||
},
|
||||
"viewFields": {
|
||||
"createdAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000660",
|
||||
},
|
||||
"name": {
|
||||
"id": "00000000-0000-0000-0000-000000000656",
|
||||
},
|
||||
"status": {
|
||||
"id": "00000000-0000-0000-0000-000000000657",
|
||||
},
|
||||
"trigger": {
|
||||
"id": "00000000-0000-0000-0000-000000000659",
|
||||
},
|
||||
"workflow": {
|
||||
"id": "00000000-0000-0000-0000-000000000658",
|
||||
},
|
||||
},
|
||||
"viewGroups": {},
|
||||
@@ -2141,122 +2214,122 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
|
||||
"workspaceMember": {
|
||||
"fields": {
|
||||
"accountOwnerForCompanies": {
|
||||
"id": "00000000-0000-0000-0000-000000000659",
|
||||
"id": "00000000-0000-0000-0000-000000000680",
|
||||
},
|
||||
"assignedTasks": {
|
||||
"id": "00000000-0000-0000-0000-000000000656",
|
||||
"id": "00000000-0000-0000-0000-000000000677",
|
||||
},
|
||||
"avatarUrl": {
|
||||
"id": "00000000-0000-0000-0000-000000000653",
|
||||
"id": "00000000-0000-0000-0000-000000000674",
|
||||
},
|
||||
"blocklist": {
|
||||
"id": "00000000-0000-0000-0000-000000000662",
|
||||
"id": "00000000-0000-0000-0000-000000000683",
|
||||
},
|
||||
"calendarEventParticipants": {
|
||||
"id": "00000000-0000-0000-0000-000000000663",
|
||||
"id": "00000000-0000-0000-0000-000000000684",
|
||||
},
|
||||
"calendarStartDay": {
|
||||
"id": "00000000-0000-0000-0000-000000000669",
|
||||
"id": "00000000-0000-0000-0000-000000000690",
|
||||
},
|
||||
"colorScheme": {
|
||||
"id": "00000000-0000-0000-0000-000000000651",
|
||||
"id": "00000000-0000-0000-0000-000000000672",
|
||||
},
|
||||
"connectedAccounts": {
|
||||
"id": "00000000-0000-0000-0000-000000000660",
|
||||
"id": "00000000-0000-0000-0000-000000000681",
|
||||
},
|
||||
"createdAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000646",
|
||||
},
|
||||
"dateFormat": {
|
||||
"id": "00000000-0000-0000-0000-000000000666",
|
||||
},
|
||||
"deletedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000648",
|
||||
},
|
||||
"favorites": {
|
||||
"id": "00000000-0000-0000-0000-000000000658",
|
||||
},
|
||||
"id": {
|
||||
"id": "00000000-0000-0000-0000-000000000645",
|
||||
},
|
||||
"locale": {
|
||||
"id": "00000000-0000-0000-0000-000000000652",
|
||||
},
|
||||
"messageParticipants": {
|
||||
"id": "00000000-0000-0000-0000-000000000661",
|
||||
},
|
||||
"name": {
|
||||
"id": "00000000-0000-0000-0000-000000000650",
|
||||
},
|
||||
"numberFormat": {
|
||||
"id": "00000000-0000-0000-0000-000000000670",
|
||||
},
|
||||
"ownedOpportunities": {
|
||||
"id": "00000000-0000-0000-0000-000000000657",
|
||||
},
|
||||
"position": {
|
||||
"id": "00000000-0000-0000-0000-000000000649",
|
||||
},
|
||||
"searchVector": {
|
||||
"id": "00000000-0000-0000-0000-000000000668",
|
||||
},
|
||||
"timeFormat": {
|
||||
"id": "00000000-0000-0000-0000-000000000667",
|
||||
},
|
||||
"dateFormat": {
|
||||
"id": "00000000-0000-0000-0000-000000000687",
|
||||
},
|
||||
"deletedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000669",
|
||||
},
|
||||
"favorites": {
|
||||
"id": "00000000-0000-0000-0000-000000000679",
|
||||
},
|
||||
"id": {
|
||||
"id": "00000000-0000-0000-0000-000000000666",
|
||||
},
|
||||
"locale": {
|
||||
"id": "00000000-0000-0000-0000-000000000673",
|
||||
},
|
||||
"messageParticipants": {
|
||||
"id": "00000000-0000-0000-0000-000000000682",
|
||||
},
|
||||
"name": {
|
||||
"id": "00000000-0000-0000-0000-000000000671",
|
||||
},
|
||||
"numberFormat": {
|
||||
"id": "00000000-0000-0000-0000-000000000691",
|
||||
},
|
||||
"ownedOpportunities": {
|
||||
"id": "00000000-0000-0000-0000-000000000678",
|
||||
},
|
||||
"position": {
|
||||
"id": "00000000-0000-0000-0000-000000000670",
|
||||
},
|
||||
"searchVector": {
|
||||
"id": "00000000-0000-0000-0000-000000000689",
|
||||
},
|
||||
"timeFormat": {
|
||||
"id": "00000000-0000-0000-0000-000000000688",
|
||||
},
|
||||
"timeZone": {
|
||||
"id": "00000000-0000-0000-0000-000000000665",
|
||||
"id": "00000000-0000-0000-0000-000000000686",
|
||||
},
|
||||
"timelineActivities": {
|
||||
"id": "00000000-0000-0000-0000-000000000664",
|
||||
"id": "00000000-0000-0000-0000-000000000685",
|
||||
},
|
||||
"updatedAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000647",
|
||||
"id": "00000000-0000-0000-0000-000000000668",
|
||||
},
|
||||
"userEmail": {
|
||||
"id": "00000000-0000-0000-0000-000000000654",
|
||||
"id": "00000000-0000-0000-0000-000000000675",
|
||||
},
|
||||
"userId": {
|
||||
"id": "00000000-0000-0000-0000-000000000655",
|
||||
"id": "00000000-0000-0000-0000-000000000676",
|
||||
},
|
||||
},
|
||||
"id": "00000000-0000-0000-0000-000000000683",
|
||||
"id": "00000000-0000-0000-0000-000000000704",
|
||||
"views": {
|
||||
"allWorkspaceMembers": {
|
||||
"id": "00000000-0000-0000-0000-000000000682",
|
||||
"id": "00000000-0000-0000-0000-000000000703",
|
||||
"viewFieldGroups": {},
|
||||
"viewFields": {
|
||||
"assignedTasks": {
|
||||
"id": "00000000-0000-0000-0000-000000000681",
|
||||
"id": "00000000-0000-0000-0000-000000000702",
|
||||
},
|
||||
"avatarUrl": {
|
||||
"id": "00000000-0000-0000-0000-000000000673",
|
||||
"id": "00000000-0000-0000-0000-000000000694",
|
||||
},
|
||||
"colorScheme": {
|
||||
"id": "00000000-0000-0000-0000-000000000674",
|
||||
"id": "00000000-0000-0000-0000-000000000695",
|
||||
},
|
||||
"createdAt": {
|
||||
"id": "00000000-0000-0000-0000-000000000679",
|
||||
"id": "00000000-0000-0000-0000-000000000700",
|
||||
},
|
||||
"dateFormat": {
|
||||
"id": "00000000-0000-0000-0000-000000000677",
|
||||
"id": "00000000-0000-0000-0000-000000000698",
|
||||
},
|
||||
"locale": {
|
||||
"id": "00000000-0000-0000-0000-000000000675",
|
||||
"id": "00000000-0000-0000-0000-000000000696",
|
||||
},
|
||||
"name": {
|
||||
"id": "00000000-0000-0000-0000-000000000671",
|
||||
"id": "00000000-0000-0000-0000-000000000692",
|
||||
},
|
||||
"ownedOpportunities": {
|
||||
"id": "00000000-0000-0000-0000-000000000680",
|
||||
"id": "00000000-0000-0000-0000-000000000701",
|
||||
},
|
||||
"timeFormat": {
|
||||
"id": "00000000-0000-0000-0000-000000000678",
|
||||
"id": "00000000-0000-0000-0000-000000000699",
|
||||
},
|
||||
"timeZone": {
|
||||
"id": "00000000-0000-0000-0000-000000000676",
|
||||
"id": "00000000-0000-0000-0000-000000000697",
|
||||
},
|
||||
"userEmail": {
|
||||
"id": "00000000-0000-0000-0000-000000000672",
|
||||
"id": "00000000-0000-0000-0000-000000000693",
|
||||
},
|
||||
},
|
||||
"viewGroups": {},
|
||||
|
||||
+2
@@ -69,6 +69,8 @@ const RECORD_PAGE_FIELDS_VIEW_NAME_BY_OBJECT: Partial<
|
||||
opportunity: 'opportunityRecordPageFields',
|
||||
task: 'taskRecordPageFields',
|
||||
note: 'noteRecordPageFields',
|
||||
workflowRun: 'workflowRunRecordPageFields',
|
||||
workflowVersion: 'workflowVersionRecordPageFields',
|
||||
};
|
||||
|
||||
const buildRecordPageWidgetConfigurations = ({
|
||||
|
||||
+4
@@ -8,6 +8,8 @@ import { computeStandardNoteViewFieldGroups } from 'src/engine/workspace-manager
|
||||
import { computeStandardOpportunityViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-opportunity-view-field-groups.util';
|
||||
import { computeStandardPersonViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-person-view-field-groups.util';
|
||||
import { computeStandardTaskViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-task-view-field-groups.util';
|
||||
import { computeStandardWorkflowRunViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-workflow-run-view-field-groups.util';
|
||||
import { computeStandardWorkflowVersionViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-workflow-version-view-field-groups.util';
|
||||
import { type CreateStandardViewFieldGroupArgs } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/create-standard-view-field-group-flat-metadata.util';
|
||||
|
||||
type StandardViewFieldGroupBuilder<P extends AllStandardObjectName> = (
|
||||
@@ -20,6 +22,8 @@ const STANDARD_FLAT_VIEW_FIELD_GROUP_METADATA_BUILDERS_BY_OBJECT_NAME = {
|
||||
opportunity: computeStandardOpportunityViewFieldGroups,
|
||||
task: computeStandardTaskViewFieldGroups,
|
||||
note: computeStandardNoteViewFieldGroups,
|
||||
workflowRun: computeStandardWorkflowRunViewFieldGroups,
|
||||
workflowVersion: computeStandardWorkflowVersionViewFieldGroups,
|
||||
} as const satisfies {
|
||||
[P in AllStandardObjectName]?: StandardViewFieldGroupBuilder<P>;
|
||||
};
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
import { type FlatViewFieldGroup } from 'src/engine/metadata-modules/flat-view-field-group/types/flat-view-field-group.type';
|
||||
import {
|
||||
createStandardViewFieldGroupFlatMetadata,
|
||||
type CreateStandardViewFieldGroupArgs,
|
||||
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/create-standard-view-field-group-flat-metadata.util';
|
||||
|
||||
export const computeStandardWorkflowRunViewFieldGroups = (
|
||||
args: Omit<CreateStandardViewFieldGroupArgs<'workflowRun'>, 'context'>,
|
||||
): Record<string, FlatViewFieldGroup> => {
|
||||
return {
|
||||
workflowRunRecordPageFieldsGeneral:
|
||||
createStandardViewFieldGroupFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldGroupName: 'general',
|
||||
name: 'General',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsAdditional:
|
||||
createStandardViewFieldGroupFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldGroupName: 'additional',
|
||||
name: 'Additional',
|
||||
position: 1,
|
||||
isVisible: true,
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsOther: createStandardViewFieldGroupFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldGroupName: 'other',
|
||||
name: 'Other',
|
||||
position: 2,
|
||||
isVisible: true,
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import { type FlatViewFieldGroup } from 'src/engine/metadata-modules/flat-view-field-group/types/flat-view-field-group.type';
|
||||
import {
|
||||
createStandardViewFieldGroupFlatMetadata,
|
||||
type CreateStandardViewFieldGroupArgs,
|
||||
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/create-standard-view-field-group-flat-metadata.util';
|
||||
|
||||
export const computeStandardWorkflowVersionViewFieldGroups = (
|
||||
args: Omit<CreateStandardViewFieldGroupArgs<'workflowVersion'>, 'context'>,
|
||||
): Record<string, FlatViewFieldGroup> => {
|
||||
return {
|
||||
workflowVersionRecordPageFieldsGeneral:
|
||||
createStandardViewFieldGroupFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
viewFieldGroupName: 'general',
|
||||
name: 'General',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
},
|
||||
}),
|
||||
workflowVersionRecordPageFieldsAdditional:
|
||||
createStandardViewFieldGroupFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
viewFieldGroupName: 'additional',
|
||||
name: 'Additional',
|
||||
position: 1,
|
||||
isVisible: true,
|
||||
},
|
||||
}),
|
||||
workflowVersionRecordPageFieldsOther:
|
||||
createStandardViewFieldGroupFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
viewFieldGroupName: 'other',
|
||||
name: 'Other',
|
||||
position: 2,
|
||||
isVisible: true,
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
+107
@@ -44,5 +44,112 @@ export const computeStandardWorkflowRunViewFields = (
|
||||
size: 150,
|
||||
},
|
||||
}),
|
||||
|
||||
// workflowRunRecordPageFields view fields
|
||||
workflowRunRecordPageFieldsName: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldName: 'name',
|
||||
fieldName: 'name',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsStatus: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldName: 'status',
|
||||
fieldName: 'status',
|
||||
position: 1,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsWorkflow: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldName: 'workflow',
|
||||
fieldName: 'workflow',
|
||||
position: 2,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsWorkflowVersion:
|
||||
createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldName: 'workflowVersion',
|
||||
fieldName: 'workflowVersion',
|
||||
position: 3,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsStartedAt: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldName: 'startedAt',
|
||||
fieldName: 'startedAt',
|
||||
position: 4,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsEndedAt: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldName: 'endedAt',
|
||||
fieldName: 'endedAt',
|
||||
position: 5,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsCreatedAt: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldName: 'createdAt',
|
||||
fieldName: 'createdAt',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'other',
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFieldsCreatedBy: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
viewFieldName: 'createdBy',
|
||||
fieldName: 'createdBy',
|
||||
position: 1,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'other',
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
+71
@@ -68,5 +68,76 @@ export const computeStandardWorkflowVersionViewFields = (
|
||||
size: 150,
|
||||
},
|
||||
}),
|
||||
|
||||
// workflowVersionRecordPageFields view fields
|
||||
workflowVersionRecordPageFieldsName: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
viewFieldName: 'name',
|
||||
fieldName: 'name',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowVersionRecordPageFieldsStatus: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
viewFieldName: 'status',
|
||||
fieldName: 'status',
|
||||
position: 1,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowVersionRecordPageFieldsWorkflow:
|
||||
createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
viewFieldName: 'workflow',
|
||||
fieldName: 'workflow',
|
||||
position: 2,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
}),
|
||||
workflowVersionRecordPageFieldsTrigger: createStandardViewFieldFlatMetadata(
|
||||
{
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
viewFieldName: 'trigger',
|
||||
fieldName: 'trigger',
|
||||
position: 3,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'general',
|
||||
},
|
||||
},
|
||||
),
|
||||
workflowVersionRecordPageFieldsCreatedAt:
|
||||
createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
viewFieldName: 'createdAt',
|
||||
fieldName: 'createdAt',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'other',
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
+12
@@ -22,5 +22,17 @@ export const computeStandardWorkflowRunViews = (
|
||||
icon: 'IconPlayerPlay',
|
||||
},
|
||||
}),
|
||||
workflowRunRecordPageFields: createStandardViewFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowRun',
|
||||
context: {
|
||||
viewName: 'workflowRunRecordPageFields',
|
||||
name: 'Workflow Run Record Page Fields',
|
||||
type: ViewType.FIELDS_WIDGET,
|
||||
key: null,
|
||||
position: 0,
|
||||
icon: 'IconList',
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
+12
@@ -22,5 +22,17 @@ export const computeStandardWorkflowVersionViews = (
|
||||
icon: 'IconRestore',
|
||||
},
|
||||
}),
|
||||
workflowVersionRecordPageFields: createStandardViewFlatMetadata({
|
||||
...args,
|
||||
objectName: 'workflowVersion',
|
||||
context: {
|
||||
viewName: 'workflowVersionRecordPageFields',
|
||||
name: 'Workflow Version Record Page Fields',
|
||||
type: ViewType.FIELDS_WIDGET,
|
||||
key: null,
|
||||
position: 0,
|
||||
icon: 'IconList',
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
+1
@@ -42,6 +42,7 @@ export class CreatePageLayoutWidgetActionHandlerService extends WorkspaceMigrati
|
||||
fromUniversalConfigurationToFlatPageLayoutWidgetConfiguration({
|
||||
universalConfiguration: action.flatEntity.universalConfiguration,
|
||||
flatFieldMetadataMaps: allFlatEntityMaps.flatFieldMetadataMaps,
|
||||
flatViewMaps: allFlatEntityMaps.flatViewMaps,
|
||||
});
|
||||
|
||||
const emptyUniversalForeignKeyAggregators =
|
||||
|
||||
+1
@@ -50,6 +50,7 @@ export class UpdatePageLayoutWidgetActionHandlerService extends WorkspaceMigrati
|
||||
fromUniversalConfigurationToFlatPageLayoutWidgetConfiguration({
|
||||
universalConfiguration,
|
||||
flatFieldMetadataMaps: allFlatEntityMaps.flatFieldMetadataMaps,
|
||||
flatViewMaps: allFlatEntityMaps.flatViewMaps,
|
||||
}),
|
||||
};
|
||||
|
||||
|
||||
+25
-1
@@ -41,9 +41,11 @@ const resolveFieldMetadataIdOrThrow = ({
|
||||
export const fromUniversalConfigurationToFlatPageLayoutWidgetConfiguration = ({
|
||||
universalConfiguration,
|
||||
flatFieldMetadataMaps,
|
||||
flatViewMaps,
|
||||
}: {
|
||||
universalConfiguration: FlatPageLayoutWidget['universalConfiguration'];
|
||||
flatFieldMetadataMaps: MetadataFlatEntityMaps<'fieldMetadata'>;
|
||||
flatViewMaps: MetadataFlatEntityMaps<'view'>;
|
||||
}): FlatPageLayoutWidget['configuration'] => {
|
||||
switch (universalConfiguration.configurationType) {
|
||||
case WidgetConfigurationType.AGGREGATE_CHART: {
|
||||
@@ -195,9 +197,31 @@ export const fromUniversalConfigurationToFlatPageLayoutWidgetConfiguration = ({
|
||||
};
|
||||
}
|
||||
|
||||
case WidgetConfigurationType.FIELDS: {
|
||||
const { viewId: viewUniversalIdentifier, ...rest } =
|
||||
universalConfiguration;
|
||||
|
||||
if (!isDefined(viewUniversalIdentifier)) {
|
||||
return { ...rest, viewId: null };
|
||||
}
|
||||
|
||||
const flatView = findFlatEntityByUniversalIdentifier({
|
||||
flatEntityMaps: flatViewMaps,
|
||||
universalIdentifier: viewUniversalIdentifier,
|
||||
});
|
||||
|
||||
if (!isDefined(flatView)) {
|
||||
throw new FlatEntityMapsException(
|
||||
`View not found for universal identifier: ${viewUniversalIdentifier}`,
|
||||
FlatEntityMapsExceptionCode.ENTITY_NOT_FOUND,
|
||||
);
|
||||
}
|
||||
|
||||
return { ...rest, viewId: flatView.id };
|
||||
}
|
||||
|
||||
case WidgetConfigurationType.VIEW:
|
||||
case WidgetConfigurationType.FIELD:
|
||||
case WidgetConfigurationType.FIELDS:
|
||||
case WidgetConfigurationType.TIMELINE:
|
||||
case WidgetConfigurationType.TASKS:
|
||||
case WidgetConfigurationType.NOTES:
|
||||
|
||||
Reference in New Issue
Block a user