Can add situations

This commit is contained in:
Luis Fernando Molina committed 2019-05-07 15:24:14 +02:00
1 parent 16b5b2ad2f
commit c4cec14fc1
1 file changed
+13 -3
+13 -3
View File
@@ -236,16 +236,25 @@ function newStrategy () {
case 'Delete Strategy':
break
case 'Add Situation':
break
case 'Add Phase':
break
case 'Edit Code':
break
case 'Add Situation':
{
let phase = payload.node
let m = phase.situations.length
let situation = {
name: 'New Situation' + ' #' + (m + 1),
conditions: []
}
phase.situations.push(situation)
createPart('Situation', situation.name, situation, phase, phase, 'Situation' + ' #' + (m + 1))
}
break
case 'Add Condition':
{
let situation = payload.node
@@ -353,3 +362,4 @@ function newStrategy () {
node.cleaned = true
}
}