From 1adddba3c3187af4eb23b957db2af229ec852bda Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Aug 2024 18:40:29 +0100 Subject: [PATCH] Prevent disabling row actions --- .../FlowChart/FlowChart.svelte | 28 +++++++++++-------- .../AutomationPanel/AutomationNavItem.svelte | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte index c263468f3b..c155b9bb1e 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte @@ -12,13 +12,17 @@ import { Icon, notifications, Modal, Toggle } from "@budibase/bbui" import { ActionStepID } from "constants/backend/automations" import UndoRedoControl from "components/common/UndoRedoControl.svelte" + import { sdk } from "@budibase/shared-core" export let automation let testDataModal let confirmDeleteDialog let scrolling = false + $: blocks = getBlocks(automation).filter(x => x.stepId !== ActionStepID.LOOP) + $: isRowAction = sdk.automations.isRowAction(automation) + const getBlocks = automation => { let blocks = [] if (automation.definition.trigger) { @@ -74,17 +78,19 @@ Test details -
- -
+ {#if !isRowAction} +
+ +
+ {/if}
diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationNavItem.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationNavItem.svelte index 1e471ba50c..8ab9851ff0 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationNavItem.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationNavItem.svelte @@ -83,7 +83,7 @@ del, ] } else { - return [pause, del] + return [del] } }