#71: Added complexity redundancy and a test workflow to shuffle-workflows

This commit is contained in:
frikky
2020-06-20 18:38:31 +02:00
parent c3d3258ed4
commit 6b975c8dde
4 changed files with 240 additions and 53 deletions
+7 -2
View File
@@ -838,7 +838,7 @@ const Workflows = (props) => {
}}
>
<FormControl>
<DialogTitle><div style={{color: "white"}}>New workflow</div></DialogTitle>
<DialogTitle><div style={{color: "white"}}>{editingWorkflow.id !== undefined ? "Editing" : "New"} workflow</div></DialogTitle>
<DialogContent>
<TextField
onBlur={(event) => setNewWorkflowName(event.target.value)}
@@ -873,7 +873,12 @@ const Workflows = (props) => {
Cancel
</Button>
<Button style={{}} disabled={newWorkflowName.length === 0} onClick={() => {
setNewWorkflow(newWorkflowName, newWorkflowDescription, {}, true)
if (editingWorkflow.id !== undefined) {
setNewWorkflow(newWorkflowName, newWorkflowDescription, editingWorkflow, false)
} else {
setNewWorkflow(newWorkflowName, newWorkflowDescription, {}, true)
}
setModalOpen(false)
}} color="primary">
Submit