fix: only show apps with actions in action step
This commit is contained in:
@@ -49,9 +49,10 @@ function ChooseAppAndEventSubstep(
|
||||
const editorContext = React.useContext(EditorContext);
|
||||
|
||||
const isTrigger = step.type === 'trigger';
|
||||
const isAction = step.type === 'action';
|
||||
|
||||
const { data } = useQuery(GET_APPS, {
|
||||
variables: { onlyWithTriggers: isTrigger },
|
||||
variables: { onlyWithTriggers: isTrigger, onlyWithActions: isAction },
|
||||
});
|
||||
const apps: IApp[] = data?.getApps;
|
||||
const app = apps?.find((currentApp: IApp) => currentApp.key === step.appKey);
|
||||
|
@@ -31,8 +31,9 @@ export default function ExecutionStep(props: ExecutionStepProps): React.ReactEle
|
||||
const [activeTabIndex, setActiveTabIndex] = React.useState(0);
|
||||
const step: IStep = executionStep.step;
|
||||
const isTrigger = step.type === 'trigger';
|
||||
const isAction = step.type === 'action';
|
||||
const formatMessage = useFormatMessage();
|
||||
const { data } = useQuery(GET_APPS, { variables: { onlyWithTriggers: isTrigger }});
|
||||
const { data } = useQuery(GET_APPS, { variables: { onlyWithTriggers: isTrigger, onlyWithActions: isAction }});
|
||||
const apps: IApp[] = data?.getApps;
|
||||
const app = apps?.find((currentApp: IApp) => currentApp.key === step.appKey);
|
||||
|
||||
|
@@ -108,10 +108,11 @@ export default function FlowStep(
|
||||
null
|
||||
);
|
||||
const isTrigger = step.type === 'trigger';
|
||||
const isAction = step.type === 'action';
|
||||
const formatMessage = useFormatMessage();
|
||||
const [currentSubstep, setCurrentSubstep] = React.useState<number | null>(0);
|
||||
const { data } = useQuery(GET_APPS, {
|
||||
variables: { onlyWithTriggers: isTrigger },
|
||||
variables: { onlyWithTriggers: isTrigger, onlyWithActions: isAction },
|
||||
});
|
||||
const [
|
||||
getStepWithTestExecutions,
|
||||
|
Reference in New Issue
Block a user