Prevent disabling row actions
This commit is contained in:
parent
cc20e7dd52
commit
1adddba3c3
|
@ -12,13 +12,17 @@
|
||||||
import { Icon, notifications, Modal, Toggle } from "@budibase/bbui"
|
import { Icon, notifications, Modal, Toggle } from "@budibase/bbui"
|
||||||
import { ActionStepID } from "constants/backend/automations"
|
import { ActionStepID } from "constants/backend/automations"
|
||||||
import UndoRedoControl from "components/common/UndoRedoControl.svelte"
|
import UndoRedoControl from "components/common/UndoRedoControl.svelte"
|
||||||
|
import { sdk } from "@budibase/shared-core"
|
||||||
|
|
||||||
export let automation
|
export let automation
|
||||||
|
|
||||||
let testDataModal
|
let testDataModal
|
||||||
let confirmDeleteDialog
|
let confirmDeleteDialog
|
||||||
let scrolling = false
|
let scrolling = false
|
||||||
|
|
||||||
$: blocks = getBlocks(automation).filter(x => x.stepId !== ActionStepID.LOOP)
|
$: blocks = getBlocks(automation).filter(x => x.stepId !== ActionStepID.LOOP)
|
||||||
|
$: isRowAction = sdk.automations.isRowAction(automation)
|
||||||
|
|
||||||
const getBlocks = automation => {
|
const getBlocks = automation => {
|
||||||
let blocks = []
|
let blocks = []
|
||||||
if (automation.definition.trigger) {
|
if (automation.definition.trigger) {
|
||||||
|
@ -74,6 +78,7 @@
|
||||||
Test details
|
Test details
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{#if !isRowAction}
|
||||||
<div class="setting-spacing">
|
<div class="setting-spacing">
|
||||||
<Toggle
|
<Toggle
|
||||||
text={automation.disabled ? "Paused" : "Activated"}
|
text={automation.disabled ? "Paused" : "Activated"}
|
||||||
|
@ -85,6 +90,7 @@
|
||||||
value={!automation.disabled}
|
value={!automation.disabled}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="canvas" on:scroll={handleScroll}>
|
<div class="canvas" on:scroll={handleScroll}>
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
del,
|
del,
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
return [pause, del]
|
return [del]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue