We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f87d16 commit 980f09bCopy full SHA for 980f09b
packages/twenty-front/src/modules/workflow/components/RecordShowPageHeaderWorkflow.tsx
@@ -37,7 +37,8 @@ export const RecordShowPageHeaderWorkflow = ({
37
onClick={() => {}}
38
/>
39
40
- {workflowWithCurrentVersion?.currentVersion?.status === 'DRAFT' ? (
+ {workflowWithCurrentVersion?.currentVersion?.status === 'DRAFT' &&
41
+ workflowWithCurrentVersion.versions?.length > 1 ? (
42
<Button
43
title="Discard Draft"
44
variant="secondary"
packages/twenty-front/src/modules/workflow/hooks/useWorkflowWithCurrentVersion.tsx
@@ -19,6 +19,7 @@ export const useWorkflowWithCurrentVersion = (
19
id: true,
20
name: true,
21
statuses: true,
22
+ versions: true,
23
},
24
skip: !isDefined(workflowId),
25
});
0 commit comments