Don't allow edit or delete actions for row actions
This commit is contained in:
parent
9428172482
commit
d601400871
|
@ -35,7 +35,11 @@
|
|||
}
|
||||
|
||||
const getContextMenuItems = () => {
|
||||
return [
|
||||
const isRowAction = automation.definition.trigger.name === "Row Action"
|
||||
const result = []
|
||||
if (!isRowAction) {
|
||||
result.push(
|
||||
...[
|
||||
{
|
||||
icon: "Delete",
|
||||
name: "Delete",
|
||||
|
@ -57,12 +61,14 @@
|
|||
name: "Duplicate",
|
||||
keyBind: null,
|
||||
visible: true,
|
||||
disabled:
|
||||
automation.definition.trigger.name === "Webhook" ||
|
||||
automation.definition.trigger.name === "Row Action",
|
||||
disabled: automation.definition.trigger.name === "Webhook",
|
||||
callback: duplicateAutomation,
|
||||
},
|
||||
{
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
result.push({
|
||||
icon: automation.disabled ? "CheckmarkCircle" : "Cancel",
|
||||
name: automation.disabled ? "Activate" : "Pause",
|
||||
keyBind: null,
|
||||
|
@ -74,8 +80,8 @@
|
|||
automation.disabled
|
||||
)
|
||||
},
|
||||
},
|
||||
]
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
const openContextMenu = e => {
|
||||
|
|
Loading…
Reference in New Issue