Skip to content

Commit

Permalink
8495 workflow display relevant columns in workflow related tables (#8502
Browse files Browse the repository at this point in the history
  • Loading branch information
martmull authored Nov 15, 2024
1 parent a2a272f commit 4f99b8e
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const RecordTableCellsVisible = () => {
<RecordTableTd
isSelected={isSelected}
isDragging={isDragging}
width={tableCellWidths[columnIndex + 3] - 1}
width={tableCellWidths[columnIndex + 3]}
>
<RecordTableCell />
</RecordTableTd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const RightDrawerWorkflowSelectActionContent = ({
<StyledActionListContainer>
{ACTIONS.map((action) => (
<MenuItem
key={action.type}
LeftIcon={action.icon}
text={action.label}
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const RightDrawerWorkflowSelectTriggerTypeContent = ({
<StyledActionListContainer>
{TRIGGER_TYPES.map((action) => (
<MenuItem
key={action.type}
LeftIcon={action.icon}
text={action.label}
onClick={async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Default: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);

await canvas.findByText('People', undefined, { timeout: 10000 });
await canvas.findByText('Companies', undefined, { timeout: 3000 });
await canvas.findByText('Linkedin');
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export const workflowRunsAllView = (
],
position: 0,
isVisible: true,
size: 210,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.status
WORKFLOW_RUN_STANDARD_FIELD_IDS.workflow
],
position: 1,
isVisible: true,
Expand All @@ -36,7 +36,7 @@ export const workflowRunsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.startedAt
WORKFLOW_RUN_STANDARD_FIELD_IDS.status
],
position: 2,
isVisible: true,
Expand All @@ -45,12 +45,30 @@ export const workflowRunsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.endedAt
WORKFLOW_RUN_STANDARD_FIELD_IDS.startedAt
],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.createdBy
],
position: 4,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.workflowVersion
],
position: 5,
isVisible: true,
size: 150,
},
],
};
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
import { WORKFLOW_VERSION_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import {
BASE_OBJECT_STANDARD_FIELD_IDS,
WORKFLOW_VERSION_STANDARD_FIELD_IDS,
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';

export const workflowVersionsAllView = (
Expand Down Expand Up @@ -27,7 +30,7 @@ export const workflowVersionsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowVersion].fields[
WORKFLOW_VERSION_STANDARD_FIELD_IDS.status
WORKFLOW_VERSION_STANDARD_FIELD_IDS.workflow
],
position: 1,
isVisible: true,
Expand All @@ -36,7 +39,7 @@ export const workflowVersionsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowVersion].fields[
WORKFLOW_VERSION_STANDARD_FIELD_IDS.trigger
WORKFLOW_VERSION_STANDARD_FIELD_IDS.status
],
position: 2,
isVisible: true,
Expand All @@ -45,12 +48,21 @@ export const workflowVersionsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowVersion].fields[
WORKFLOW_VERSION_STANDARD_FIELD_IDS.steps
BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt
],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowVersion].fields[
WORKFLOW_VERSION_STANDARD_FIELD_IDS.runs
],
position: 4,
isVisible: true,
size: 150,
},
],
};
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
import { WORKFLOW_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import {
BASE_OBJECT_STANDARD_FIELD_IDS,
WORKFLOW_STANDARD_FIELD_IDS,
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';

export const workflowsAllView = (
Expand All @@ -22,17 +25,53 @@ export const workflowsAllView = (
],
position: 0,
isVisible: true,
size: 210,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
WORKFLOW_STANDARD_FIELD_IDS.lastPublishedVersionId
WORKFLOW_STANDARD_FIELD_IDS.statuses
],
position: 1,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt
],
position: 2,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
WORKFLOW_STANDARD_FIELD_IDS.createdBy
],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
WORKFLOW_STANDARD_FIELD_IDS.versions
],
position: 4,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
WORKFLOW_STANDARD_FIELD_IDS.runs
],
position: 5,
isVisible: true,
size: 150,
},
],
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ export const WORKFLOW_STANDARD_FIELD_IDS = {
eventListeners: '20202020-0229-4c66-832e-035c67579a38',
favorites: '20202020-c554-4c41-be7a-cf9cd4b0d512',
timelineActivities: '20202020-906e-486a-a798-131a5f081faf',
createdBy: '20202020-6007-401a-8aa5-e6f48581a6f3',
};

export const WORKFLOW_RUN_STANDARD_FIELD_IDS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ export class WorkflowRunWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: WORKFLOW_RUN_STANDARD_FIELD_IDS.createdBy,
type: FieldMetadataType.ACTOR,
label: 'Created by',
label: 'Executed by',
icon: 'IconCreativeCommonsSa',
description: 'The creator of the record',
description: 'The executor of the workflow',
defaultValue: {
source: `'${FieldActorSource.MANUAL}'`,
name: "''",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
import { WorkflowEventListenerWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow-event-listener.workspace-entity';
import { WorkflowRunWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow-run.workspace-entity';
import { WorkflowVersionWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow-version.workspace-entity';
import {
ActorMetadata,
FieldActorSource,
} from 'src/engine/metadata-modules/field-metadata/composite-types/actor.composite-type';

export enum WorkflowStatus {
DRAFT = 'DRAFT',
Expand Down Expand Up @@ -160,4 +164,17 @@ export class WorkflowWorkspaceEntity extends BaseWorkspaceEntity {
})
@WorkspaceIsSystem()
timelineActivities: Relation<TimelineActivityWorkspaceEntity[]>;

@WorkspaceField({
standardId: WORKFLOW_STANDARD_FIELD_IDS.createdBy,
type: FieldMetadataType.ACTOR,
label: 'Created by',
icon: 'IconCreativeCommonsSa',
description: 'The creator of the record',
defaultValue: {
source: `'${FieldActorSource.MANUAL}'`,
name: "''",
},
})
createdBy: ActorMetadata;
}

0 comments on commit 4f99b8e

Please sign in to comment.