diff --git a/frontend/src/AngularWorkflow.js b/frontend/src/AngularWorkflow.js index bf9ac4cb..ec848df6 100644 --- a/frontend/src/AngularWorkflow.js +++ b/frontend/src/AngularWorkflow.js @@ -1525,10 +1525,10 @@ const AngularWorkflow = (props) => { { try { JSON.parse(event.target.value) } catch (e) { - alert.error("Failed to parse json") + alert.error("Failed to parse json: ", e) } } }} @@ -2939,23 +2939,32 @@ const AngularWorkflow = (props) => {
{data.name}
-
{ - changeActionParameterVariant("STATIC_VALUE") + +
{ + e.preventDefault() + changeActionParameterVariant("STATIC_VALUE") + }}> + +
+
+  |  + +
{ + e.preventDefault() + changeActionParameterVariant("ACTION_RESULT") }}> - static -
+ +
+  |  -
{ - changeActionParameterVariant("ACTION_RESULT") - }}> - action -
-  |  -
{ - changeActionParameterVariant("WORKFLOW_VARIABLE") - }}> - var -
+ +
{ + e.preventDefault() + changeActionParameterVariant("WORKFLOW_VARIABLE") + }}> + +
+
{datafield} @@ -3091,8 +3100,16 @@ const AngularWorkflow = (props) => { const [anchorEl, setAnchorEl] = React.useState(null); const deleteCondition = (conditionIndex) => { - //selectedEdge.conditions.splice(conditionIndex, 1) - //setSelectedEdge(selectedEdge) + console.log(selectedEdge) + if (selectedEdge.conditions.length === 1) { + selectedEdge.conditions = [] + } else { + selectedEdge.conditions.splice(conditionIndex, 1) + } + + setSelectedEdge(selectedEdge) + setOpen(false) + setUpdate("delete "+conditionIndex) } const paperVariableStyle = { @@ -3108,6 +3125,7 @@ const AngularWorkflow = (props) => { } const menuClick = (event) => { + console.log("MENU CLICK") setOpen(!open) setAnchorEl(event.currentTarget); }