Fix bug with deleting automations
This commit is contained in:
parent
4d8e4061b3
commit
123b4394c3
|
@ -13,6 +13,7 @@
|
||||||
$: allowDeleteBlock =
|
$: allowDeleteBlock =
|
||||||
$automationStore.selectedBlock?.type !== "TRIGGER" ||
|
$automationStore.selectedBlock?.type !== "TRIGGER" ||
|
||||||
!automation?.definition?.steps?.length
|
!automation?.definition?.steps?.length
|
||||||
|
$: name = automation?.name ?? ""
|
||||||
|
|
||||||
function deleteAutomationBlock() {
|
function deleteAutomationBlock() {
|
||||||
automationStore.actions.deleteAutomationBlock(
|
automationStore.actions.deleteAutomationBlock(
|
||||||
|
@ -101,7 +102,7 @@
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
title="Confirm Delete"
|
title="Confirm Delete"
|
||||||
body={`Are you sure you wish to delete the automation '${automation.name}'?`}
|
body={`Are you sure you wish to delete the automation '${name}'?`}
|
||||||
okText="Delete Automation"
|
okText="Delete Automation"
|
||||||
onOk={deleteAutomation} />
|
onOk={deleteAutomation} />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue