Commit c9dc4bdb authored by Romain DELEAU's avatar Romain DELEAU

traces update value part1:...

traces update value part1: educationnal-objective/game-characters/game-context-game-educationnal-objective/mission-context/role/rules/step
parent f8e83f39
...@@ -8,8 +8,9 @@ export class Trace { ...@@ -8,8 +8,9 @@ export class Trace {
target?: string; target?: string;
color?: string; color?: string;
flag?: string; flag?: string;
value?: string;
constructor(sequence: number, action: string, mission?: number, role?: number, Case?: string, target?: string, color?: string, flag?: string) { constructor(sequence: number, action: string, mission?: number, role?: number, Case?: string, target?: string, color?: string, flag?: string, value?: string) {
this.sequence = sequence; this.sequence = sequence;
this.timestamp = new Date().toLocaleString('fr'); this.timestamp = new Date().toLocaleString('fr');
this.action = action; this.action = action;
...@@ -19,5 +20,6 @@ export class Trace { ...@@ -19,5 +20,6 @@ export class Trace {
this.target = target; this.target = target;
this.color = color; this.color = color;
this.flag = flag; this.flag = flag;
this.value = value;
} }
} }
...@@ -83,7 +83,7 @@ export class EducationalObjectiveComponent implements OnInit { ...@@ -83,7 +83,7 @@ export class EducationalObjectiveComponent implements OnInit {
editTrace(event: any, source: string): void { editTrace(event: any, source: string): void {
if (event.target.value != '') { if (event.target.value != '') {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.i,undefined,source,'Obj_m', '#D0BBDB')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.i,undefined,source,'Obj_m', '#D0BBDB', undefined, event.target.value));
} else { } else {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.i,undefined,source,'Obj_m', '#D0BBDB')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.i,undefined,source,'Obj_m', '#D0BBDB'));
} }
......
...@@ -197,7 +197,7 @@ export class GameCharactersComponent implements OnInit { ...@@ -197,7 +197,7 @@ export class GameCharactersComponent implements OnInit {
editTrace(event: any, source: string): void { editTrace(event: any, source: string): void {
if (event.target.value != '') { if (event.target.value != '') {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',undefined,undefined,source,'Characters', '#CE7B66')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',undefined,undefined,source,'Characters', '#CE7B66', undefined, event.target.value));
} else { } else {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',undefined,undefined,source,'Characters', '#CE7B66')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',undefined,undefined,source,'Characters', '#CE7B66'));
} }
......
...@@ -51,7 +51,7 @@ export class GameContextComponent implements OnInit { ...@@ -51,7 +51,7 @@ export class GameContextComponent implements OnInit {
editTrace(event: any, source: string): void { editTrace(event: any, source: string): void {
if (event.target.value != '') { if (event.target.value != '') {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',undefined,undefined,source,'Context_g', '#B6CC87')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',undefined,undefined,source,'Context_g', '#B6CC87', undefined, event.target.value));
} else { } else {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',undefined,undefined,source,'Context_g', '#B6CC87')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',undefined,undefined,source,'Context_g', '#B6CC87'));
} }
......
...@@ -47,7 +47,7 @@ export class GameEducationnalObjectiveComponent implements OnInit { ...@@ -47,7 +47,7 @@ export class GameEducationnalObjectiveComponent implements OnInit {
editTrace(event: any, source: string): void { editTrace(event: any, source: string): void {
if (event.target.value != '') { if (event.target.value != '') {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',undefined,undefined,source,'Obj_g', '#BAC5D8')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',undefined,undefined,source,'Obj_g', '#BAC5D8', undefined, event.target.value));
} else { } else {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',undefined,undefined,source,'Obj_g', '#BAC5D8')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',undefined,undefined,source,'Obj_g', '#BAC5D8'));
} }
......
...@@ -86,7 +86,7 @@ export class MissionContextComponent implements OnInit { ...@@ -86,7 +86,7 @@ export class MissionContextComponent implements OnInit {
editTrace(event: any, source: string): void { editTrace(event: any, source: string): void {
if (event.target.value != '') { if (event.target.value != '') {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.i,undefined,source,'Context_m', '#EAC19B')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.i,undefined,source,'Context_m', '#EAC19B', undefined, event.target.value));
} else { } else {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.i,undefined,source,'Context_m', '#EAC19B')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.i,undefined,source,'Context_m', '#EAC19B'));
} }
......
...@@ -695,7 +695,7 @@ export class RoleComponent implements OnInit { ...@@ -695,7 +695,7 @@ export class RoleComponent implements OnInit {
editTrace(event: any, source: string): void { editTrace(event: any, source: string): void {
if (event.target.value != '') { if (event.target.value != '') {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.missionIndex,this.i,source,'Role_['+(this.i)+']', '#9AD5EC','*')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.missionIndex,this.i,source,'Role_['+(this.i)+']', '#9AD5EC','*', event.target.value));
} else { } else {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.missionIndex,this.i,source,'Role_['+(this.i)+']', '#9AD5EC','*')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.missionIndex,this.i,source,'Role_['+(this.i)+']', '#9AD5EC','*'));
} }
......
...@@ -244,7 +244,7 @@ export class RulesComponent implements OnInit { ...@@ -244,7 +244,7 @@ export class RulesComponent implements OnInit {
editTrace(event: any, source: string): void { editTrace(event: any, source: string): void {
if (event.target.value != '') { if (event.target.value != '') {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',undefined,undefined,source,'Rules', '#C6C2BD')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',undefined,undefined,source,'Rules', '#C6C2BD', undefined, event.target.value));
} else { } else {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',undefined,undefined,source,'Rules', '#C6C2BD')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',undefined,undefined,source,'Rules', '#C6C2BD'));
} }
......
...@@ -164,13 +164,13 @@ export class StepComponent implements OnInit { ...@@ -164,13 +164,13 @@ export class StepComponent implements OnInit {
editTrace(event: any, source: string): void { editTrace(event: any, source: string): void {
if (event.target.value != '') { if (event.target.value != '') {
if (this.parent instanceof Mission) { if (this.parent instanceof Mission) {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.missionIndex,undefined,source,'Step_m_['+this.index+']','#ACC9FC')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.missionIndex,undefined,source,'Step_m_['+this.index+']','#ACC9FC', undefined, event.target.value));
} else if (this.parent instanceof Role) { } else if (this.parent instanceof Role) {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.missionIndex,this.roleIndex,source,'Step_r_['+this.index+']','#ACC9FC')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'write',this.missionIndex,this.roleIndex,source,'Step_r_['+this.index+']','#ACC9FC'));
} }
} else { } else {
if (this.parent instanceof Mission) { if (this.parent instanceof Mission) {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.missionIndex,undefined,source,'Step_m_['+this.index+']','#ACC9FC')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.missionIndex,undefined,source,'Step_m_['+this.index+']','#ACC9FC', undefined, event.target.value));
} else if (this.parent instanceof Role) { } else if (this.parent instanceof Role) {
this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.missionIndex,this.roleIndex,source,'Step_r_['+this.index+']','#ACC9FC')); this.scenario.traces.push(new Trace(this.scenario.traces.length,'erase',this.missionIndex,this.roleIndex,source,'Step_r_['+this.index+']','#ACC9FC'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment