diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte index 0829b85a90..532e0ff068 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte @@ -53,6 +53,18 @@ x => x.blockToLoop === block.id ) + async function removeLooping() { + loopingSelected = false + let loopBlock = + $automationStore.selectedAutomation?.automation.definition.steps.find( + x => x.blockToLoop === block.id + ) + automationStore.actions.deleteAutomationBlock(loopBlock) + await automationStore.actions.save( + $automationStore.selectedAutomation?.automation + ) + } + async function deleteStep() { let loopBlock = $automationStore.selectedAutomation?.automation.definition.steps.find( @@ -151,9 +163,7 @@ {#if !showLooping}
-
deleteStep()}> - -
+ removeLooping()} icon="DeleteOutline" />
{#each schemaProperties as [key, value]}
- + {#if value.type === "string" && value.enum}