From e7c02e2fb8c4d73e30efd8a05acb6819767aceeb Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 8 Feb 2022 14:52:08 +0000 Subject: [PATCH] allow use of plain inputs for automations enabling use of bindings in all types --- .../builderStore/store/automation/index.js | 7 ++ .../FlowChart/ConfigModal.svelte | 25 ++++ .../FlowChart/FlowChart.svelte | 17 +++ .../FlowChart/FlowItem.svelte | 1 - .../automation/SetupPanel/RowSelector.svelte | 111 +++++++++--------- .../SetupPanel/RowSelectorTypes.svelte | 64 ++++++++++ 6 files changed, 171 insertions(+), 54 deletions(-) create mode 100644 packages/builder/src/components/automation/AutomationBuilder/FlowChart/ConfigModal.svelte create mode 100644 packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte diff --git a/packages/builder/src/builderStore/store/automation/index.js b/packages/builder/src/builderStore/store/automation/index.js index 7bd0ccca22..e2b9e53eda 100644 --- a/packages/builder/src/builderStore/store/automation/index.js +++ b/packages/builder/src/builderStore/store/automation/index.js @@ -45,6 +45,7 @@ const automationActions = store => ({ return state }) }, + save: async automation => { const UPDATE_AUTOMATION_URL = `/api/automations` const response = await api.put(UPDATE_AUTOMATION_URL, automation) @@ -119,6 +120,12 @@ const automationActions = store => ({ name: block.name, }) }, + toggleFieldControl: value => { + store.update(state => { + state.selectedAutomation.automation.rowFieldControl = value + return state + }) + }, deleteAutomationBlock: block => { store.update(state => { const idx = diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ConfigModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ConfigModal.svelte new file mode 100644 index 0000000000..26a95f8860 --- /dev/null +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ConfigModal.svelte @@ -0,0 +1,25 @@ + + + + + diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte index 2d6881d652..f39bc2d337 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte @@ -12,9 +12,12 @@ notifications, Modal, } from "@budibase/bbui" + import ConfigModal from "./ConfigModal.svelte" export let automation export let onSelect + + let configModal let testDataModal let blocks let confirmDeleteDialog @@ -59,6 +62,16 @@
{automation.name}
+
+
+ +
+
+ + + +