From 056edd8ec2d3e4d26fb4bba52971ccb9c050be8e Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Fri, 3 Mar 2023 11:36:23 -0500 Subject: [PATCH] fix event type options (#7473) Co-authored-by: CarinaWolli --- .../ee/workflows/components/WorkflowDetailsPage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/features/ee/workflows/components/WorkflowDetailsPage.tsx b/packages/features/ee/workflows/components/WorkflowDetailsPage.tsx index 38d7747067..99c680a79f 100644 --- a/packages/features/ee/workflows/components/WorkflowDetailsPage.tsx +++ b/packages/features/ee/workflows/components/WorkflowDetailsPage.tsx @@ -42,8 +42,10 @@ export default function WorkflowDetailsPage(props: Props) { const eventTypeOptions = useMemo( () => data?.eventTypeGroups.reduce((options, group) => { - /** only show event types that belong to team or user */ - if (!(!teamId && !group.teamId) || teamId !== group.teamId) return options; + /** don't show team event types for user workflow */ + if (!teamId && group.teamId) return options; + /** only show correct team event types for team workflows */ + if (teamId && teamId !== group.teamId) return options; return [ ...options, ...group.eventTypes.map((eventType) => ({