From af9b9b692124464a5a7f3e93ba76e93e319a252a Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 4 May 2022 10:24:28 +0100 Subject: [PATCH 1/3] Some foreach block fixes --- .../FlowChart/FlowItem.svelte | 16 ++++++++--- packages/server/src/threads/automation.js | 27 ++++++++++--------- 2 files changed, 28 insertions(+), 15 deletions(-) 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" />
Date: Wed, 4 May 2022 11:55:26 +0100 Subject: [PATCH 2/3] linting --- .../SetupPanel/AutomationBlockSetup.svelte | 8 ++++- .../server/src/automations/automationUtils.js | 12 +++++++ packages/server/src/threads/automation.js | 36 ++++++++++++------- 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 68afc04886..416a1ecace 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -177,12 +177,18 @@ onChange({ detail: tempFilters }, defKey) drawer.hide() } + console.log(schemaProperties) + console.log(inputData)
{#each schemaProperties as [key, value]}
- + {#if value.type === "string" && value.enum}