Add Workflow Run show page (#7719)
In this PR: - Display a workflow version visualizer for the version of the workflow the run was executed on. - Display the output of the run as code. https://github.com/user-attachments/assets/d617300a-bff4-4328-a35c-291dc86d81cf
This commit is contained in:
committed by
GitHub
parent
b914182b78
commit
e7eeb3b820
@ -8,6 +8,7 @@ import {
|
||||
IconMail,
|
||||
IconNotes,
|
||||
IconPaperclip,
|
||||
IconPrinter,
|
||||
IconSettings,
|
||||
IconTimelineEvent,
|
||||
} from 'twenty-ui';
|
||||
@ -26,6 +27,10 @@ export const useRecordShowContainerTabs = (
|
||||
const isWorkflowVersion =
|
||||
isWorkflowEnabled &&
|
||||
targetObjectNameSingular === CoreObjectNameSingular.WorkflowVersion;
|
||||
const isWorkflowRun =
|
||||
isWorkflowEnabled &&
|
||||
targetObjectNameSingular === CoreObjectNameSingular.WorkflowRun;
|
||||
const isWorkflowRelated = isWorkflow || isWorkflowVersion || isWorkflowRun;
|
||||
|
||||
const isCompanyOrPerson = [
|
||||
CoreObjectNameSingular.Company,
|
||||
@ -54,7 +59,7 @@ export const useRecordShowContainerTabs = (
|
||||
id: 'timeline',
|
||||
title: 'Timeline',
|
||||
Icon: IconTimelineEvent,
|
||||
hide: isInRightDrawer || isWorkflow || isWorkflowVersion,
|
||||
hide: isInRightDrawer || isWorkflowRelated,
|
||||
},
|
||||
{
|
||||
id: 'tasks',
|
||||
@ -63,8 +68,7 @@ export const useRecordShowContainerTabs = (
|
||||
hide:
|
||||
targetObjectNameSingular === CoreObjectNameSingular.Note ||
|
||||
targetObjectNameSingular === CoreObjectNameSingular.Task ||
|
||||
isWorkflow ||
|
||||
isWorkflowVersion,
|
||||
isWorkflowRelated,
|
||||
},
|
||||
{
|
||||
id: 'notes',
|
||||
@ -73,14 +77,13 @@ export const useRecordShowContainerTabs = (
|
||||
hide:
|
||||
targetObjectNameSingular === CoreObjectNameSingular.Note ||
|
||||
targetObjectNameSingular === CoreObjectNameSingular.Task ||
|
||||
isWorkflow ||
|
||||
isWorkflowVersion,
|
||||
isWorkflowRelated,
|
||||
},
|
||||
{
|
||||
id: 'files',
|
||||
title: 'Files',
|
||||
Icon: IconPaperclip,
|
||||
hide: isWorkflow || isWorkflowVersion,
|
||||
hide: isWorkflowRelated,
|
||||
},
|
||||
{
|
||||
id: 'emails',
|
||||
@ -102,9 +105,21 @@ export const useRecordShowContainerTabs = (
|
||||
},
|
||||
{
|
||||
id: 'workflowVersion',
|
||||
title: 'Workflow Version',
|
||||
title: 'Flow',
|
||||
Icon: IconSettings,
|
||||
hide: !isWorkflowVersion,
|
||||
},
|
||||
{
|
||||
id: 'workflowRunOutput',
|
||||
title: 'Output',
|
||||
Icon: IconPrinter,
|
||||
hide: !isWorkflowRun,
|
||||
},
|
||||
{
|
||||
id: 'workflowRunFlow',
|
||||
title: 'Flow',
|
||||
Icon: IconSettings,
|
||||
hide: !isWorkflowRun,
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user