disable duplicate for webhook triggers automation

Co-authored-by: Moshood Abidemi <olalekanteeblaze@gmail.com>
This commit is contained in:
gitstart 2023-05-18 14:05:05 +00:00
parent 441a9f65bb
commit 036e355c9b
1 changed files with 6 additions and 1 deletions

View File

@ -32,7 +32,12 @@
<div slot="control" class="icon">
<Icon s hoverable name="MoreSmallList" />
</div>
<MenuItem icon="Duplicate" on:click={duplicateAutomation}>Duplicate</MenuItem>
<MenuItem
icon="Duplicate"
on:click={duplicateAutomation}
disabled={automation.definition.trigger.name === "Webhook"}
>Duplicate</MenuItem
>
<MenuItem icon="Edit" on:click={updateAutomationDialog.show}>Edit</MenuItem>
<MenuItem icon="Delete" on:click={confirmDeleteDialog.show}>Delete</MenuItem>
</ActionMenu>