feat: show poll interval in trigger step
This commit is contained in:
@@ -52,6 +52,7 @@ function ChooseAppAndEventSubstep(props: ChooseAppAndEventSubstepProps): React.R
|
||||
const appOptions = React.useMemo(() => apps?.map((app) => optionGenerator(app)), [apps]);
|
||||
const actionsOrTriggers = isTrigger ? app?.triggers : app?.actions;
|
||||
const actionOptions = React.useMemo(() => actionsOrTriggers?.map((trigger) => optionGenerator(trigger)) ?? [], [app?.key]);
|
||||
const selectedActionOrTrigger = actionsOrTriggers?.find((actionOrTrigger) => actionOrTrigger.key === step?.key) || null;
|
||||
|
||||
const {
|
||||
name,
|
||||
@@ -140,6 +141,16 @@ function ChooseAppAndEventSubstep(props: ChooseAppAndEventSubstepProps): React.R
|
||||
</Box>
|
||||
)}
|
||||
|
||||
{isTrigger && selectedActionOrTrigger?.pollInterval && (
|
||||
<TextField
|
||||
label="Poll interval"
|
||||
value={`Every ${selectedActionOrTrigger.pollInterval} minutes`}
|
||||
sx={{ mt: 2 }}
|
||||
fullWidth
|
||||
disabled
|
||||
/>
|
||||
)}
|
||||
|
||||
<Button
|
||||
fullWidth
|
||||
variant="contained"
|
||||
|
@@ -54,6 +54,7 @@ export const GET_APP = gql`
|
||||
triggers {
|
||||
name
|
||||
key
|
||||
pollInterval
|
||||
description
|
||||
substeps {
|
||||
name
|
||||
|
@@ -53,6 +53,7 @@ export const GET_APPS = gql`
|
||||
triggers {
|
||||
name
|
||||
key
|
||||
pollInterval
|
||||
description
|
||||
substeps {
|
||||
key
|
||||
|
Reference in New Issue
Block a user