parent
d8387835a8
commit
056edd8ec2
|
@ -42,8 +42,10 @@ export default function WorkflowDetailsPage(props: Props) {
|
||||||
const eventTypeOptions = useMemo(
|
const eventTypeOptions = useMemo(
|
||||||
() =>
|
() =>
|
||||||
data?.eventTypeGroups.reduce((options, group) => {
|
data?.eventTypeGroups.reduce((options, group) => {
|
||||||
/** only show event types that belong to team or user */
|
/** don't show team event types for user workflow */
|
||||||
if (!(!teamId && !group.teamId) || teamId !== group.teamId) return options;
|
if (!teamId && group.teamId) return options;
|
||||||
|
/** only show correct team event types for team workflows */
|
||||||
|
if (teamId && teamId !== group.teamId) return options;
|
||||||
return [
|
return [
|
||||||
...options,
|
...options,
|
||||||
...group.eventTypes.map((eventType) => ({
|
...group.eventTypes.map((eventType) => ({
|
||||||
|
|
Loading…
Reference in New Issue