Fix role CRUD

This commit is contained in:
Andrew Kingston 2024-09-11 15:55:48 +01:00
parent a81d9c6dd1
commit de7604f8fd
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -29,12 +29,12 @@
let tempColor let tempColor
const deleteNode = async () => { const deleteNode = async () => {
await roles.delete(nodeToRole({ id, data }))
flow.deleteElements({ flow.deleteElements({
nodes: [{ id }], nodes: [{ id }],
}) })
await tick() await tick()
doAutoLayout() doAutoLayout()
await roles.delete(nodeToRole({ id, data }))
} }
const openPopover = () => { const openPopover = () => {
@ -45,12 +45,12 @@
} }
const saveChanges = async () => { const saveChanges = async () => {
await roles.save(nodeToRole({ id, data }))
flow.updateNodeData(id, { flow.updateNodeData(id, {
displayName: tempDisplayName, displayName: tempDisplayName,
description: tempDescription, description: tempDescription,
color: tempColor, color: tempColor,
}) })
await roles.save(nodeToRole({ id, data }))
} }
const doAutoLayout = () => { const doAutoLayout = () => {