Commit 6bb93da2 authored by Romain DELEAU's avatar Romain DELEAU

Changes to the tutorial + Removal of conditions on prerequisites (adding a...

Changes to the tutorial + Removal of conditions on prerequisites (adding a condition on tasks other than subtasks preventing subtask prerequisites) + Addition of a condition for a unique common task symbol in a role + Fix clean-dialog text
parent 2d3f102b
<h2 mat-dialog-title>{{'dialog_clean_title' | translate}}</h2> <h2 mat-dialog-title>{{'dialog_clear_title' | translate}}</h2>
<mat-dialog-content>{{'dialog_clean_content' | translate}} {{data}} ?</mat-dialog-content> <mat-dialog-content>{{'dialog_clear_content' | translate}} {{data}} ?</mat-dialog-content>
<mat-dialog-actions align="end"> <mat-dialog-actions align="end">
<button mat-button mat-dialog-close>{{'dialog_button_no' | translate}}</button> <button mat-button mat-dialog-close>{{'dialog_button_no' | translate}}</button>
<button mat-button [mat-dialog-close]="true" cdkFocusInitial>{{'dialog_button_yes' | translate}}</button> <button mat-button [mat-dialog-close]="true" cdkFocusInitial>{{'dialog_button_yes' | translate}}</button>
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
&-title { &-title {
font-family: "Glacial Indifference Bold"; font-family: "Glacial Indifference Bold";
} }
p {
white-space: pre-wrap;
}
} }
&-optionnal { &-optionnal {
......
...@@ -10,6 +10,7 @@ import { CleanDialogComponent } from 'src/app/components/dialogs/clean-dialog/cl ...@@ -10,6 +10,7 @@ import { CleanDialogComponent } from 'src/app/components/dialogs/clean-dialog/cl
import { CreateDialogComponent } from 'src/app/components/dialogs/create-dialog/create-dialog.component'; import { CreateDialogComponent } from 'src/app/components/dialogs/create-dialog/create-dialog.component';
import { Trace } from 'src/app/class/trace/trace'; import { Trace } from 'src/app/class/trace/trace';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { TutorialService } from 'src/app/services/tutorial/tutorial.service';
@Component({ @Component({
selector: 'app-educational-objective', selector: 'app-educational-objective',
...@@ -22,7 +23,7 @@ export class EducationalObjectiveComponent implements OnInit { ...@@ -22,7 +23,7 @@ export class EducationalObjectiveComponent implements OnInit {
@Input() scenario: Scenario = new Scenario(); @Input() scenario: Scenario = new Scenario();
@Input() i: number = 0; @Input() i: number = 0;
constructor(protected pieceDetailsService: PieceDetailsService, protected tooltipService: TooltipService, public dialog: MatDialog, protected translate: TranslateService) { } constructor(protected pieceDetailsService: PieceDetailsService, protected tooltipService: TooltipService, public dialog: MatDialog, protected translate: TranslateService, private tutorialService: TutorialService) { }
ngOnInit(): void { ngOnInit(): void {
} }
...@@ -86,5 +87,13 @@ export class EducationalObjectiveComponent implements OnInit { ...@@ -86,5 +87,13 @@ export class EducationalObjectiveComponent implements OnInit {
} 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'));
} }
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 3
&& this.scenario.educationnalObjective.objective
&& this.scenario.context.univers && this.scenario.context.support && this.scenario.context.duration && this.scenario.context.intrigue && this.scenario.context.other
&& this.scenario.missions[0].context.duration && this.scenario.missions[0].context.intrigue && this.scenario.missions[0].context.communication && this.scenario.missions[0].context.various
&& this.scenario.missions[0].educationnalObjective.objective) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase();
}
} }
} }
...@@ -55,7 +55,11 @@ export class GameContextComponent implements OnInit { ...@@ -55,7 +55,11 @@ export class GameContextComponent implements OnInit {
} 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'));
} }
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 3) { if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 3
&& this.scenario.educationnalObjective.objective
&& this.scenario.context.univers && this.scenario.context.support && this.scenario.context.duration && this.scenario.context.intrigue && this.scenario.context.other
&& this.scenario.missions[0].context.duration && this.scenario.missions[0].context.intrigue && this.scenario.missions[0].context.communication && this.scenario.missions[0].context.various
&& this.scenario.missions[0].educationnalObjective.objective) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial')); this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase(); this.tutorialService.validPhase();
} }
......
...@@ -51,7 +51,11 @@ export class GameEducationnalObjectiveComponent implements OnInit { ...@@ -51,7 +51,11 @@ export class GameEducationnalObjectiveComponent implements OnInit {
} 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'));
} }
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 3) { if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 3
&& this.scenario.educationnalObjective.objective
&& this.scenario.context.univers && this.scenario.context.support && this.scenario.context.duration && this.scenario.context.intrigue && this.scenario.context.other
&& this.scenario.missions[0].context.duration && this.scenario.missions[0].context.intrigue && this.scenario.missions[0].context.communication && this.scenario.missions[0].context.various
&& this.scenario.missions[0].educationnalObjective.objective) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial')); this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase(); this.tutorialService.validPhase();
} }
......
...@@ -10,6 +10,7 @@ import { CleanDialogComponent } from 'src/app/components/dialogs/clean-dialog/cl ...@@ -10,6 +10,7 @@ import { CleanDialogComponent } from 'src/app/components/dialogs/clean-dialog/cl
import { CreateDialogComponent } from 'src/app/components/dialogs/create-dialog/create-dialog.component'; import { CreateDialogComponent } from 'src/app/components/dialogs/create-dialog/create-dialog.component';
import { Trace } from 'src/app/class/trace/trace'; import { Trace } from 'src/app/class/trace/trace';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { TutorialService } from 'src/app/services/tutorial/tutorial.service';
@Component({ @Component({
selector: 'app-mission-context', selector: 'app-mission-context',
...@@ -18,7 +19,7 @@ import { TranslateService } from '@ngx-translate/core'; ...@@ -18,7 +19,7 @@ import { TranslateService } from '@ngx-translate/core';
}) })
export class MissionContextComponent implements OnInit { export class MissionContextComponent implements OnInit {
constructor(protected pieceDetailsService: PieceDetailsService, protected tooltipService: TooltipService, public dialog: MatDialog, protected translate: TranslateService) { } constructor(protected pieceDetailsService: PieceDetailsService, protected tooltipService: TooltipService, public dialog: MatDialog, protected translate: TranslateService, private tutorialService: TutorialService) { }
@Input() missionContext: MissionContext = new MissionContext(); @Input() missionContext: MissionContext = new MissionContext();
@Input() scenario: Scenario = new Scenario(); @Input() scenario: Scenario = new Scenario();
...@@ -89,5 +90,13 @@ export class MissionContextComponent implements OnInit { ...@@ -89,5 +90,13 @@ export class MissionContextComponent implements OnInit {
} 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'));
} }
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 3
&& this.scenario.educationnalObjective.objective
&& this.scenario.context.univers && this.scenario.context.support && this.scenario.context.duration && this.scenario.context.intrigue && this.scenario.context.other
&& this.scenario.missions[0].context.duration && this.scenario.missions[0].context.intrigue && this.scenario.missions[0].context.communication && this.scenario.missions[0].context.various
&& this.scenario.missions[0].educationnalObjective.objective) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase();
}
} }
} }
...@@ -25,7 +25,7 @@ matTooltipPosition="left" [matTooltipDisabled]="!tooltipService.activatedTooltip ...@@ -25,7 +25,7 @@ matTooltipPosition="left" [matTooltipDisabled]="!tooltipService.activatedTooltip
<img src="./assets/background-images/role2_opacity0.png" draggable="false" *ngIf="i == 1"/> <img src="./assets/background-images/role2_opacity0.png" draggable="false" *ngIf="i == 1"/>
<div class="piece-form-intitule"> <div class="piece-form-intitule">
<label for="intitule">{{'role_intitule_label' | translate}}</label> <label for="intitule">{{'role_intitule_label' | translate}}</label>
<input name="intitule" type="text" [(ngModel)]="role.intitule" (change)="editTrace($event,'name')" [placeholder]="translate.instant('role_intitule_placeholder')" <input name="intitule" type="text" [(ngModel)]="role.intitule" (change)="editTrace($event,'name'); validTutorialPhase4();" [placeholder]="translate.instant('role_intitule_placeholder')"
[matTooltip]="translate.instant('role_intitule_tooltip')" [matTooltip]="translate.instant('role_intitule_tooltip')"
matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips"/> matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips"/>
</div> </div>
......
...@@ -49,10 +49,6 @@ export class RoleComponent implements OnInit { ...@@ -49,10 +49,6 @@ export class RoleComponent implements OnInit {
this.pieceDetailsService.missionIndex = this.missionIndex; this.pieceDetailsService.missionIndex = this.missionIndex;
this.pieceDetailsService.roleIndex = this.i; this.pieceDetailsService.roleIndex = this.i;
this.pieceDetailsService.pieceIndex = this.i; this.pieceDetailsService.pieceIndex = this.i;
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 4) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase();
}
} }
onClickAdd(): void { onClickAdd(): void {
...@@ -281,8 +277,18 @@ export class RoleComponent implements OnInit { ...@@ -281,8 +277,18 @@ export class RoleComponent implements OnInit {
} }
} }
validTutorialPhase4(): void {
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 4
&& this.scenario.missions[0].roles[0].intitule && this.scenario.missions[0].roles[1].intitule) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase();
}
}
validTutorialPhase5(): void { validTutorialPhase5(): void {
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 5 && this.role.questName && this.role.rewards.length > 0) { if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 5
&& this.scenario.missions[0].roles[0].questName && this.scenario.missions[0].roles[0].rewards.length > 0
&& this.scenario.missions[0].roles[1].questName && this.scenario.missions[0].roles[1].rewards.length > 0) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial')); this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase(); this.tutorialService.validPhase();
} }
......
...@@ -55,18 +55,17 @@ ...@@ -55,18 +55,17 @@
<div class="piece-prerequires-prerequires"> <div class="piece-prerequires-prerequires">
<label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label> <label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label>
<div class="piece-prerequires-form"> <div class="piece-prerequires-form">
<div style="text-align: center;" *ngIf="j == 0">{{'task_prerequire_antecedents_err1' | translate}}</div>
<ng-container *ngIf="hasPossibleAntecedents()"> <ng-container *ngIf="hasPossibleAntecedents()">
<ng-container *ngFor="let inlineTask of role.tasks"> <ng-container *ngFor="let inlineTask of role.tasks">
<ng-container *ngFor="let element of inlineTask; let index = index"> <ng-container *ngFor="let element of inlineTask; let index = index">
<div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && index < j"> <div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier)">
<input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/> <input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/>
<label for="antecedent">{{element?.identifier}}</label> <label for="antecedent">{{element?.identifier}}</label>
</div> </div>
</ng-container> </ng-container>
</ng-container> </ng-container>
</ng-container> </ng-container>
<div style="text-align: center;" *ngIf="!hasPossibleAntecedents() && j != 0">{{'task_prerequire_antecedents_err2' | translate}}</div> <div style="text-align: center;" *ngIf="!hasPossibleAntecedents()">{{'task_prerequire_antecedents_err2' | translate}}</div>
</div> </div>
</div> </div>
<div class="piece-prerequires-ressources"> <div class="piece-prerequires-ressources">
......
...@@ -53,8 +53,10 @@ export class AnnexeTaskComponent implements OnInit { ...@@ -53,8 +53,10 @@ export class AnnexeTaskComponent implements OnInit {
this.minimapService.reset(); this.minimapService.reset();
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 9) { if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 9) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial')); this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this._snackBar.openFromComponent(FinishTutorialComponent, { duration: 5000 });
this.tutorialService.validPhase(); this.tutorialService.validPhase();
if (this.tutorialService.isDone()) {
this._snackBar.openFromComponent(FinishTutorialComponent, { duration: 5000 });
}
} }
} }
...@@ -330,7 +332,7 @@ export class AnnexeTaskComponent implements OnInit { ...@@ -330,7 +332,7 @@ export class AnnexeTaskComponent implements OnInit {
hasPossibleAntecedents(): boolean { hasPossibleAntecedents(): boolean {
let res = false; let res = false;
this.role.tasks.forEach(inlineTask => { this.role.tasks.forEach(inlineTask => {
for(let i = 0; i < this.j; i++) { for(let i = 0; i < inlineTask.length; i++) {
if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) { if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) {
res = true; res = true;
} }
......
...@@ -56,26 +56,26 @@ ...@@ -56,26 +56,26 @@
<div><mat-icon fontIcon="delete" (click)="setSymbol('','')"></mat-icon></div> <div><mat-icon fontIcon="delete" (click)="setSymbol('','')"></mat-icon></div>
</div> </div>
<div class="piece-symbolchoice-symbols"> <div class="piece-symbolchoice-symbols">
<mat-icon [style.color]="'#d79297'" fontIcon="favorite" (click)="setSymbol('favorite','#d79297')"></mat-icon> <mat-icon [style.color]="'#d79297'" fontIcon="favorite" (click)="canUseSymbol('favorite','#d79297') == 'enable' ? setSymbol('favorite','#d79297') : ''" [ngClass]="canUseSymbol('favorite','#d79297')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="diamond" (click)="setSymbol('diamond','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="diamond" (click)="canUseSymbol('diamond','#9ad5ec') == 'enable' ? setSymbol('diamond','#9ad5ec') : ''" [ngClass]="canUseSymbol('diamond','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#e9ec54'" fontIcon="star" (click)="setSymbol('star','#e9ec54')"></mat-icon> <mat-icon [style.color]="'#e9ec54'" fontIcon="star" (click)="canUseSymbol('star','#e9ec54') == 'enable' ? setSymbol('star','#e9ec54') : ''" [ngClass]="canUseSymbol('star','#e9ec54')"></mat-icon>
<mat-icon [style.color]="'#f5cee3'" fontIcon="hexagon" (click)="setSymbol('hexagon','#f5cee3')"></mat-icon> <mat-icon [style.color]="'#f5cee3'" fontIcon="hexagon" (click)="canUseSymbol('hexagon','#f5cee3') == 'enable' ? setSymbol('hexagon','#f5cee3') : ''" [ngClass]="canUseSymbol('hexagon','#f5cee3')"></mat-icon>
<mat-icon [style.color]="'#d3d2d2'" fontIcon="add" (click)="setSymbol('add','#d3d2d2')"></mat-icon> <mat-icon [style.color]="'#d3d2d2'" fontIcon="add" (click)="canUseSymbol('add','#d3d2d2') == 'enable' ? setSymbol('add','#d3d2d2') : ''" [ngClass]="canUseSymbol('add','#d3d2d2')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="circle" (click)="setSymbol('circle','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="circle" (click)="canUseSymbol('circle','#9ad5ec') == 'enable' ? setSymbol('circle','#9ad5ec') : ''" [ngClass]="canUseSymbol('circle','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#b6cc87'" fontIcon="eco" (click)="setSymbol('eco','#b6cc87')"></mat-icon> <mat-icon [style.color]="'#b6cc87'" fontIcon="eco" (click)="canUseSymbol('eco','#b6cc87') == 'enable' ? setSymbol('eco','#b6cc87') : ''" [ngClass]="canUseSymbol('eco','#b6cc87')"></mat-icon>
<mat-icon [style.color]="'#d0bbdb'" fontIcon="play_arrow" (click)="setSymbol('play_arrow','#d0bbdb')"></mat-icon> <mat-icon [style.color]="'#d0bbdb'" fontIcon="play_arrow" (click)="canUseSymbol('play_arrow','#d0bbdb') == 'enable' ? setSymbol('play_arrow','#d0bbdb') : ''" [ngClass]="canUseSymbol('play_arrow','#d0bbdb')"></mat-icon>
<mat-icon [style.color]="'#8b7e64'" fontIcon="remove" (click)="setSymbol('remove','#8b7e64')"></mat-icon> <mat-icon [style.color]="'#8b7e64'" fontIcon="remove" (click)="canUseSymbol('remove','#8b7e64') == 'enable' ? setSymbol('remove','#8b7e64') : ''" [ngClass]="canUseSymbol('remove','#8b7e64')"></mat-icon>
</div> </div>
<div class="piece-symbolchoice-symbols"> <div class="piece-symbolchoice-symbols">
<mat-icon [style.color]="'#d79297'" fontIcon="square" (click)="setSymbol('square','#d79297')"></mat-icon> <mat-icon [style.color]="'#d79297'" fontIcon="square" (click)="canUseSymbol('square','#d79297') == 'enable' ? setSymbol('square','#d79297') : ''" [ngClass]="canUseSymbol('square','#d79297')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="setSymbol('square','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="canUseSymbol('square','#9ad5ec') == 'enable' ? setSymbol('square','#9ad5ec') : ''" [ngClass]="canUseSymbol('square','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#e9ec54'" fontIcon="square" (click)="setSymbol('square','#e9ec54')"></mat-icon> <mat-icon [style.color]="'#e9ec54'" fontIcon="square" (click)="canUseSymbol('square','#e9ec54') == 'enable' ? setSymbol('square','#e9ec54') : ''" [ngClass]="canUseSymbol('square','#e9ec54')"></mat-icon>
<mat-icon [style.color]="'#f5cee3'" fontIcon="square" (click)="setSymbol('square','#f5cee3')"></mat-icon> <mat-icon [style.color]="'#f5cee3'" fontIcon="square" (click)="canUseSymbol('square','#f5cee3') == 'enable' ? setSymbol('square','#f5cee3') : ''" [ngClass]="canUseSymbol('square','#f5cee3')"></mat-icon>
<mat-icon [style.color]="'#d3d2d2'" fontIcon="square" (click)="setSymbol('square','#d3d2d2')"></mat-icon> <mat-icon [style.color]="'#d3d2d2'" fontIcon="square" (click)="canUseSymbol('square','#d3d2d2') == 'enable' ? setSymbol('square','#d3d2d2') : ''" [ngClass]="canUseSymbol('square','#d3d2d2')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="setSymbol('square','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="canUseSymbol('square','#9ad5ec') == 'enable' ? setSymbol('square','#9ad5ec') : ''" [ngClass]="canUseSymbol('square','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#b6cc87'" fontIcon="square" (click)="setSymbol('square','#b6cc87')"></mat-icon> <mat-icon [style.color]="'#b6cc87'" fontIcon="square" (click)="canUseSymbol('square','#b6cc87') == 'enable' ? setSymbol('square','#b6cc87') : ''" [ngClass]="canUseSymbol('square','#b6cc87')"></mat-icon>
<mat-icon [style.color]="'#d0bbdb'" fontIcon="square" (click)="setSymbol('square','#d0bbdb')"></mat-icon> <mat-icon [style.color]="'#d0bbdb'" fontIcon="square" (click)="canUseSymbol('square','#d0bbdb') == 'enable' ? setSymbol('square','#d0bbdb') : ''" [ngClass]="canUseSymbol('square','#d0bbdb')"></mat-icon>
<mat-icon [style.color]="'#8b7e64'" fontIcon="square" (click)="setSymbol('square','#8b7e64')"></mat-icon> <mat-icon [style.color]="'#8b7e64'" fontIcon="square" (click)="canUseSymbol('square','#8b7e64') == 'enable' ? setSymbol('square','#8b7e64') : ''" [ngClass]="canUseSymbol('square','#8b7e64')"></mat-icon>
</div> </div>
</div> </div>
...@@ -83,18 +83,17 @@ ...@@ -83,18 +83,17 @@
<div class="piece-prerequires-prerequires"> <div class="piece-prerequires-prerequires">
<label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label> <label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label>
<div class="piece-prerequires-form"> <div class="piece-prerequires-form">
<div style="text-align: center;" *ngIf="j == 0">{{'task_prerequire_antecedents_err1' | translate}}</div>
<ng-container *ngIf="hasPossibleAntecedents()"> <ng-container *ngIf="hasPossibleAntecedents()">
<ng-container *ngFor="let inlineTask of role.tasks"> <ng-container *ngFor="let inlineTask of role.tasks">
<ng-container *ngFor="let element of inlineTask; let index = index"> <ng-container *ngFor="let element of inlineTask; let index = index">
<div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && index < j"> <div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && element?.type != 'annexe'">
<input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/> <input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/>
<label for="antecedent">{{element?.identifier}}</label> <label for="antecedent">{{element?.identifier}}</label>
</div> </div>
</ng-container> </ng-container>
</ng-container> </ng-container>
</ng-container> </ng-container>
<div style="text-align: center;" *ngIf="!hasPossibleAntecedents() && j != 0">{{'task_prerequire_antecedents_err2' | translate}}</div> <div style="text-align: center;" *ngIf="!hasPossibleAntecedents()">{{'task_prerequire_antecedents_err2' | translate}}</div>
</div> </div>
</div> </div>
<div class="piece-prerequires-ressources"> <div class="piece-prerequires-ressources">
......
...@@ -94,6 +94,11 @@ ...@@ -94,6 +94,11 @@
opacity: 0.75; opacity: 0.75;
} }
mat-icon.disable {
opacity: 0.2;
cursor: not-allowed;
}
&-header { &-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -177,6 +177,16 @@ export class FinalTaskComponent implements OnInit { ...@@ -177,6 +177,16 @@ export class FinalTaskComponent implements OnInit {
} }
} }
canUseSymbol(symbol: string, symbolColor: string): string {
let res: string = 'enable';
this.role.tasks.forEach(inlineTasks => {
if (inlineTasks.some(task => task?.symbol.symbol == symbol && task?.symbol.color == symbolColor)) {
res = 'disable';
}
});
return res;
}
changeDisplayPrerequires(): void { changeDisplayPrerequires(): void {
if(this.displayPrequires == 'show') { if(this.displayPrequires == 'show') {
this.displayPrequires = 'hide'; this.displayPrequires = 'hide';
...@@ -330,7 +340,7 @@ export class FinalTaskComponent implements OnInit { ...@@ -330,7 +340,7 @@ export class FinalTaskComponent implements OnInit {
hasPossibleAntecedents(): boolean { hasPossibleAntecedents(): boolean {
let res = false; let res = false;
this.role.tasks.forEach(inlineTask => { this.role.tasks.forEach(inlineTask => {
for(let i = 0; i < this.j; i++) { for(let i = 0; i < inlineTask.length; i++) {
if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) { if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) {
res = true; res = true;
} }
......
...@@ -57,26 +57,26 @@ ...@@ -57,26 +57,26 @@
<div><mat-icon fontIcon="delete" (click)="setSymbol('','')"></mat-icon></div> <div><mat-icon fontIcon="delete" (click)="setSymbol('','')"></mat-icon></div>
</div> </div>
<div class="piece-symbolchoice-symbols"> <div class="piece-symbolchoice-symbols">
<mat-icon [style.color]="'#d79297'" fontIcon="favorite" (click)="setSymbol('favorite','#d79297')"></mat-icon> <mat-icon [style.color]="'#d79297'" fontIcon="favorite" (click)="canUseSymbol('favorite','#d79297') == 'enable' ? setSymbol('favorite','#d79297') : ''" [ngClass]="canUseSymbol('favorite','#d79297')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="diamond" (click)="setSymbol('diamond','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="diamond" (click)="canUseSymbol('diamond','#9ad5ec') == 'enable' ? setSymbol('diamond','#9ad5ec') : ''" [ngClass]="canUseSymbol('diamond','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#e9ec54'" fontIcon="star" (click)="setSymbol('star','#e9ec54')"></mat-icon> <mat-icon [style.color]="'#e9ec54'" fontIcon="star" (click)="canUseSymbol('star','#e9ec54') == 'enable' ? setSymbol('star','#e9ec54') : ''" [ngClass]="canUseSymbol('star','#e9ec54')"></mat-icon>
<mat-icon [style.color]="'#f5cee3'" fontIcon="hexagon" (click)="setSymbol('hexagon','#f5cee3')"></mat-icon> <mat-icon [style.color]="'#f5cee3'" fontIcon="hexagon" (click)="canUseSymbol('hexagon','#f5cee3') == 'enable' ? setSymbol('hexagon','#f5cee3') : ''" [ngClass]="canUseSymbol('hexagon','#f5cee3')"></mat-icon>
<mat-icon [style.color]="'#d3d2d2'" fontIcon="add" (click)="setSymbol('add','#d3d2d2')"></mat-icon> <mat-icon [style.color]="'#d3d2d2'" fontIcon="add" (click)="canUseSymbol('add','#d3d2d2') == 'enable' ? setSymbol('add','#d3d2d2') : ''" [ngClass]="canUseSymbol('add','#d3d2d2')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="circle" (click)="setSymbol('circle','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="circle" (click)="canUseSymbol('circle','#9ad5ec') == 'enable' ? setSymbol('circle','#9ad5ec') : ''" [ngClass]="canUseSymbol('circle','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#b6cc87'" fontIcon="eco" (click)="setSymbol('eco','#b6cc87')"></mat-icon> <mat-icon [style.color]="'#b6cc87'" fontIcon="eco" (click)="canUseSymbol('eco','#b6cc87') == 'enable' ? setSymbol('eco','#b6cc87') : ''" [ngClass]="canUseSymbol('eco','#b6cc87')"></mat-icon>
<mat-icon [style.color]="'#d0bbdb'" fontIcon="play_arrow" (click)="setSymbol('play_arrow','#d0bbdb')"></mat-icon> <mat-icon [style.color]="'#d0bbdb'" fontIcon="play_arrow" (click)="canUseSymbol('play_arrow','#d0bbdb') == 'enable' ? setSymbol('play_arrow','#d0bbdb') : ''" [ngClass]="canUseSymbol('play_arrow','#d0bbdb')"></mat-icon>
<mat-icon [style.color]="'#8b7e64'" fontIcon="remove" (click)="setSymbol('remove','#8b7e64')"></mat-icon> <mat-icon [style.color]="'#8b7e64'" fontIcon="remove" (click)="canUseSymbol('remove','#8b7e64') == 'enable' ? setSymbol('remove','#8b7e64') : ''" [ngClass]="canUseSymbol('remove','#8b7e64')"></mat-icon>
</div> </div>
<div class="piece-symbolchoice-symbols"> <div class="piece-symbolchoice-symbols">
<mat-icon [style.color]="'#d79297'" fontIcon="square" (click)="setSymbol('square','#d79297')"></mat-icon> <mat-icon [style.color]="'#d79297'" fontIcon="square" (click)="canUseSymbol('square','#d79297') == 'enable' ? setSymbol('square','#d79297') : ''" [ngClass]="canUseSymbol('square','#d79297')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="setSymbol('square','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="canUseSymbol('square','#9ad5ec') == 'enable' ? setSymbol('square','#9ad5ec') : ''" [ngClass]="canUseSymbol('square','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#e9ec54'" fontIcon="square" (click)="setSymbol('square','#e9ec54')"></mat-icon> <mat-icon [style.color]="'#e9ec54'" fontIcon="square" (click)="canUseSymbol('square','#e9ec54') == 'enable' ? setSymbol('square','#e9ec54') : ''" [ngClass]="canUseSymbol('square','#e9ec54')"></mat-icon>
<mat-icon [style.color]="'#f5cee3'" fontIcon="square" (click)="setSymbol('square','#f5cee3')"></mat-icon> <mat-icon [style.color]="'#f5cee3'" fontIcon="square" (click)="canUseSymbol('square','#f5cee3') == 'enable' ? setSymbol('square','#f5cee3') : ''" [ngClass]="canUseSymbol('square','#f5cee3')"></mat-icon>
<mat-icon [style.color]="'#d3d2d2'" fontIcon="square" (click)="setSymbol('square','#d3d2d2')"></mat-icon> <mat-icon [style.color]="'#d3d2d2'" fontIcon="square" (click)="canUseSymbol('square','#d3d2d2') == 'enable' ? setSymbol('square','#d3d2d2') : ''" [ngClass]="canUseSymbol('square','#d3d2d2')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="setSymbol('square','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="canUseSymbol('square','#9ad5ec') == 'enable' ? setSymbol('square','#9ad5ec') : ''" [ngClass]="canUseSymbol('square','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#b6cc87'" fontIcon="square" (click)="setSymbol('square','#b6cc87')"></mat-icon> <mat-icon [style.color]="'#b6cc87'" fontIcon="square" (click)="canUseSymbol('square','#b6cc87') == 'enable' ? setSymbol('square','#b6cc87') : ''" [ngClass]="canUseSymbol('square','#b6cc87')"></mat-icon>
<mat-icon [style.color]="'#d0bbdb'" fontIcon="square" (click)="setSymbol('square','#d0bbdb')"></mat-icon> <mat-icon [style.color]="'#d0bbdb'" fontIcon="square" (click)="canUseSymbol('square','#d0bbdb') == 'enable' ? setSymbol('square','#d0bbdb') : ''" [ngClass]="canUseSymbol('square','#d0bbdb')"></mat-icon>
<mat-icon [style.color]="'#8b7e64'" fontIcon="square" (click)="setSymbol('square','#8b7e64')"></mat-icon> <mat-icon [style.color]="'#8b7e64'" fontIcon="square" (click)="canUseSymbol('square','#8b7e64') == 'enable' ? setSymbol('square','#8b7e64') : ''" [ngClass]="canUseSymbol('square','#8b7e64')"></mat-icon>
</div> </div>
</div> </div>
...@@ -84,18 +84,17 @@ ...@@ -84,18 +84,17 @@
<div class="piece-prerequires-prerequires"> <div class="piece-prerequires-prerequires">
<label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label> <label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label>
<div class="piece-prerequires-form"> <div class="piece-prerequires-form">
<div style="text-align: center;" *ngIf="j == 0">{{'task_prerequire_antecedents_err1' | translate}}</div>
<ng-container *ngIf="hasPossibleAntecedents()"> <ng-container *ngIf="hasPossibleAntecedents()">
<ng-container *ngFor="let inlineTask of role.tasks"> <ng-container *ngFor="let inlineTask of role.tasks">
<ng-container *ngFor="let element of inlineTask; let index = index"> <ng-container *ngFor="let element of inlineTask; let index = index">
<div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && index < j"> <div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && element?.type != 'annexe'">
<input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/> <input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/>
<label for="antecedent">{{element?.identifier}}</label> <label for="antecedent">{{element?.identifier}}</label>
</div> </div>
</ng-container> </ng-container>
</ng-container> </ng-container>
</ng-container> </ng-container>
<div style="text-align: center;" *ngIf="!hasPossibleAntecedents() && j != 0">{{'task_prerequire_antecedents_err2' | translate}}</div> <div style="text-align: center;" *ngIf="!hasPossibleAntecedents()">{{'task_prerequire_antecedents_err2' | translate}}</div>
</div> </div>
</div> </div>
<div class="piece-prerequires-ressources"> <div class="piece-prerequires-ressources">
......
...@@ -94,6 +94,11 @@ ...@@ -94,6 +94,11 @@
opacity: 0.75; opacity: 0.75;
} }
mat-icon.disable {
opacity: 0.2;
cursor: not-allowed;
}
&-header { &-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -176,6 +176,16 @@ export class OptionnalTaskComponent implements OnInit { ...@@ -176,6 +176,16 @@ export class OptionnalTaskComponent implements OnInit {
} }
} }
canUseSymbol(symbol: string, symbolColor: string): string {
let res: string = 'enable';
this.role.tasks.forEach(inlineTasks => {
if (inlineTasks.some(task => task?.symbol.symbol == symbol && task?.symbol.color == symbolColor)) {
res = 'disable';
}
});
return res;
}
changeDisplayPrerequires(): void { changeDisplayPrerequires(): void {
if(this.displayPrequires == 'show') { if(this.displayPrequires == 'show') {
this.displayPrequires = 'hide'; this.displayPrequires = 'hide';
...@@ -347,7 +357,7 @@ export class OptionnalTaskComponent implements OnInit { ...@@ -347,7 +357,7 @@ export class OptionnalTaskComponent implements OnInit {
hasPossibleAntecedents(): boolean { hasPossibleAntecedents(): boolean {
let res = false; let res = false;
this.role.tasks.forEach(inlineTask => { this.role.tasks.forEach(inlineTask => {
for(let i = 0; i < this.j; i++) { for(let i = 0; i < inlineTask.length; i++) {
if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) { if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) {
res = true; res = true;
} }
......
...@@ -45,26 +45,26 @@ ...@@ -45,26 +45,26 @@
<div><mat-icon fontIcon="delete" (click)="setSymbol('','')"></mat-icon></div> <div><mat-icon fontIcon="delete" (click)="setSymbol('','')"></mat-icon></div>
</div> </div>
<div class="piece-symbolchoice-symbols"> <div class="piece-symbolchoice-symbols">
<mat-icon [style.color]="'#d79297'" fontIcon="favorite" (click)="setSymbol('favorite','#d79297')"></mat-icon> <mat-icon [style.color]="'#d79297'" fontIcon="favorite" (click)="canUseSymbol('favorite','#d79297') == 'enable' ? setSymbol('favorite','#d79297') : ''" [ngClass]="canUseSymbol('favorite','#d79297')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="diamond" (click)="setSymbol('diamond','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="diamond" (click)="canUseSymbol('diamond','#9ad5ec') == 'enable' ? setSymbol('diamond','#9ad5ec') : ''" [ngClass]="canUseSymbol('diamond','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#e9ec54'" fontIcon="star" (click)="setSymbol('star','#e9ec54')"></mat-icon> <mat-icon [style.color]="'#e9ec54'" fontIcon="star" (click)="canUseSymbol('star','#e9ec54') == 'enable' ? setSymbol('star','#e9ec54') : ''" [ngClass]="canUseSymbol('star','#e9ec54')"></mat-icon>
<mat-icon [style.color]="'#f5cee3'" fontIcon="hexagon" (click)="setSymbol('hexagon','#f5cee3')"></mat-icon> <mat-icon [style.color]="'#f5cee3'" fontIcon="hexagon" (click)="canUseSymbol('hexagon','#f5cee3') == 'enable' ? setSymbol('hexagon','#f5cee3') : ''" [ngClass]="canUseSymbol('hexagon','#f5cee3')"></mat-icon>
<mat-icon [style.color]="'#d3d2d2'" fontIcon="add" (click)="setSymbol('add','#d3d2d2')"></mat-icon> <mat-icon [style.color]="'#d3d2d2'" fontIcon="add" (click)="canUseSymbol('add','#d3d2d2') == 'enable' ? setSymbol('add','#d3d2d2') : ''" [ngClass]="canUseSymbol('add','#d3d2d2')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="circle" (click)="setSymbol('circle','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="circle" (click)="canUseSymbol('circle','#9ad5ec') == 'enable' ? setSymbol('circle','#9ad5ec') : ''" [ngClass]="canUseSymbol('circle','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#b6cc87'" fontIcon="eco" (click)="setSymbol('eco','#b6cc87')"></mat-icon> <mat-icon [style.color]="'#b6cc87'" fontIcon="eco" (click)="canUseSymbol('eco','#b6cc87') == 'enable' ? setSymbol('eco','#b6cc87') : ''" [ngClass]="canUseSymbol('eco','#b6cc87')"></mat-icon>
<mat-icon [style.color]="'#d0bbdb'" fontIcon="play_arrow" (click)="setSymbol('play_arrow','#d0bbdb')"></mat-icon> <mat-icon [style.color]="'#d0bbdb'" fontIcon="play_arrow" (click)="canUseSymbol('play_arrow','#d0bbdb') == 'enable' ? setSymbol('play_arrow','#d0bbdb') : ''" [ngClass]="canUseSymbol('play_arrow','#d0bbdb')"></mat-icon>
<mat-icon [style.color]="'#8b7e64'" fontIcon="remove" (click)="setSymbol('remove','#8b7e64')"></mat-icon> <mat-icon [style.color]="'#8b7e64'" fontIcon="remove" (click)="canUseSymbol('remove','#8b7e64') == 'enable' ? setSymbol('remove','#8b7e64') : ''" [ngClass]="canUseSymbol('remove','#8b7e64')"></mat-icon>
</div> </div>
<div class="piece-symbolchoice-symbols"> <div class="piece-symbolchoice-symbols">
<mat-icon [style.color]="'#d79297'" fontIcon="square" (click)="setSymbol('square','#d79297')"></mat-icon> <mat-icon [style.color]="'#d79297'" fontIcon="square" (click)="canUseSymbol('square','#d79297') == 'enable' ? setSymbol('square','#d79297') : ''" [ngClass]="canUseSymbol('square','#d79297')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="setSymbol('square','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="canUseSymbol('square','#9ad5ec') == 'enable' ? setSymbol('square','#9ad5ec') : ''" [ngClass]="canUseSymbol('square','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#e9ec54'" fontIcon="square" (click)="setSymbol('square','#e9ec54')"></mat-icon> <mat-icon [style.color]="'#e9ec54'" fontIcon="square" (click)="canUseSymbol('square','#e9ec54') == 'enable' ? setSymbol('square','#e9ec54') : ''" [ngClass]="canUseSymbol('square','#e9ec54')"></mat-icon>
<mat-icon [style.color]="'#f5cee3'" fontIcon="square" (click)="setSymbol('square','#f5cee3')"></mat-icon> <mat-icon [style.color]="'#f5cee3'" fontIcon="square" (click)="canUseSymbol('square','#f5cee3') == 'enable' ? setSymbol('square','#f5cee3') : ''" [ngClass]="canUseSymbol('square','#f5cee3')"></mat-icon>
<mat-icon [style.color]="'#d3d2d2'" fontIcon="square" (click)="setSymbol('square','#d3d2d2')"></mat-icon> <mat-icon [style.color]="'#d3d2d2'" fontIcon="square" (click)="canUseSymbol('square','#d3d2d2') == 'enable' ? setSymbol('square','#d3d2d2') : ''" [ngClass]="canUseSymbol('square','#d3d2d2')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="setSymbol('square','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="canUseSymbol('square','#9ad5ec') == 'enable' ? setSymbol('square','#9ad5ec') : ''" [ngClass]="canUseSymbol('square','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#b6cc87'" fontIcon="square" (click)="setSymbol('square','#b6cc87')"></mat-icon> <mat-icon [style.color]="'#b6cc87'" fontIcon="square" (click)="canUseSymbol('square','#b6cc87') == 'enable' ? setSymbol('square','#b6cc87') : ''" [ngClass]="canUseSymbol('square','#b6cc87')"></mat-icon>
<mat-icon [style.color]="'#d0bbdb'" fontIcon="square" (click)="setSymbol('square','#d0bbdb')"></mat-icon> <mat-icon [style.color]="'#d0bbdb'" fontIcon="square" (click)="canUseSymbol('square','#d0bbdb') == 'enable' ? setSymbol('square','#d0bbdb') : ''" [ngClass]="canUseSymbol('square','#d0bbdb')"></mat-icon>
<mat-icon [style.color]="'#8b7e64'" fontIcon="square" (click)="setSymbol('square','#8b7e64')"></mat-icon> <mat-icon [style.color]="'#8b7e64'" fontIcon="square" (click)="canUseSymbol('square','#8b7e64') == 'enable' ? setSymbol('square','#8b7e64') : ''" [ngClass]="canUseSymbol('square','#8b7e64')"></mat-icon>
</div> </div>
</div> </div>
...@@ -72,18 +72,17 @@ ...@@ -72,18 +72,17 @@
<div class="piece-prerequires-prerequires"> <div class="piece-prerequires-prerequires">
<label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label> <label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label>
<div class="piece-prerequires-form"> <div class="piece-prerequires-form">
<div style="text-align: center;" *ngIf="j == 0">{{'task_prerequire_antecedents_err1' | translate}}</div>
<ng-container *ngIf="hasPossibleAntecedents()"> <ng-container *ngIf="hasPossibleAntecedents()">
<ng-container *ngFor="let inlineTask of role.tasks"> <ng-container *ngFor="let inlineTask of role.tasks">
<ng-container *ngFor="let element of inlineTask; let index = index"> <ng-container *ngFor="let element of inlineTask; let index = index">
<div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && index < j"> <div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && element?.type != 'annexe'">
<input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/> <input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/>
<label for="antecedent">{{element?.identifier}}</label> <label for="antecedent">{{element?.identifier}}</label>
</div> </div>
</ng-container> </ng-container>
</ng-container> </ng-container>
</ng-container> </ng-container>
<div style="text-align: center;" *ngIf="!hasPossibleAntecedents() && j != 0">{{'task_prerequire_antecedents_err2' | translate}}</div> <div style="text-align: center;" *ngIf="!hasPossibleAntecedents()">{{'task_prerequire_antecedents_err2' | translate}}</div>
</div> </div>
</div> </div>
<div class="piece-prerequires-ressources"> <div class="piece-prerequires-ressources">
......
...@@ -85,6 +85,11 @@ ...@@ -85,6 +85,11 @@
opacity: 0.75; opacity: 0.75;
} }
mat-icon.disable {
opacity: 0.2;
cursor: not-allowed;
}
&-header { &-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -167,6 +167,16 @@ export class RandomEventComponent implements OnInit { ...@@ -167,6 +167,16 @@ export class RandomEventComponent implements OnInit {
} }
} }
canUseSymbol(symbol: string, symbolColor: string): string {
let res: string = 'enable';
this.role.tasks.forEach(inlineTasks => {
if (inlineTasks.some(task => task?.symbol.symbol == symbol && task?.symbol.color == symbolColor)) {
res = 'disable';
}
});
return res;
}
changeDisplayPrerequires(): void { changeDisplayPrerequires(): void {
if(this.displayPrequires == 'show') { if(this.displayPrequires == 'show') {
this.displayPrequires = 'hide'; this.displayPrequires = 'hide';
...@@ -324,7 +334,7 @@ export class RandomEventComponent implements OnInit { ...@@ -324,7 +334,7 @@ export class RandomEventComponent implements OnInit {
hasPossibleAntecedents(): boolean { hasPossibleAntecedents(): boolean {
let res = false; let res = false;
this.role.tasks.forEach(inlineTask => { this.role.tasks.forEach(inlineTask => {
for(let i = 0; i < this.j; i++) { for(let i = 0; i < inlineTask.length; i++) {
if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) { if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) {
res = true; res = true;
} }
......
...@@ -55,26 +55,26 @@ ...@@ -55,26 +55,26 @@
<div><mat-icon fontIcon="delete" (click)="setSymbol('','')"></mat-icon></div> <div><mat-icon fontIcon="delete" (click)="setSymbol('','')"></mat-icon></div>
</div> </div>
<div class="piece-symbolchoice-symbols"> <div class="piece-symbolchoice-symbols">
<mat-icon [style.color]="'#d79297'" fontIcon="favorite" (click)="setSymbol('favorite','#d79297')"></mat-icon> <mat-icon [style.color]="'#d79297'" fontIcon="favorite" (click)="canUseSymbol('favorite','#d79297') == 'enable' ? setSymbol('favorite','#d79297') : ''" [ngClass]="canUseSymbol('favorite','#d79297')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="diamond" (click)="setSymbol('diamond','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="diamond" (click)="canUseSymbol('diamond','#9ad5ec') == 'enable' ? setSymbol('diamond','#9ad5ec') : ''" [ngClass]="canUseSymbol('diamond','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#e9ec54'" fontIcon="star" (click)="setSymbol('star','#e9ec54')"></mat-icon> <mat-icon [style.color]="'#e9ec54'" fontIcon="star" (click)="canUseSymbol('star','#e9ec54') == 'enable' ? setSymbol('star','#e9ec54') : ''" [ngClass]="canUseSymbol('star','#e9ec54')"></mat-icon>
<mat-icon [style.color]="'#f5cee3'" fontIcon="hexagon" (click)="setSymbol('hexagon','#f5cee3')"></mat-icon> <mat-icon [style.color]="'#f5cee3'" fontIcon="hexagon" (click)="canUseSymbol('hexagon','#f5cee3') == 'enable' ? setSymbol('hexagon','#f5cee3') : ''" [ngClass]="canUseSymbol('hexagon','#f5cee3')"></mat-icon>
<mat-icon [style.color]="'#d3d2d2'" fontIcon="add" (click)="setSymbol('add','#d3d2d2')"></mat-icon> <mat-icon [style.color]="'#d3d2d2'" fontIcon="add" (click)="canUseSymbol('add','#d3d2d2') == 'enable' ? setSymbol('add','#d3d2d2') : ''" [ngClass]="canUseSymbol('add','#d3d2d2')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="circle" (click)="setSymbol('circle','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="circle" (click)="canUseSymbol('circle','#9ad5ec') == 'enable' ? setSymbol('circle','#9ad5ec') : ''" [ngClass]="canUseSymbol('circle','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#b6cc87'" fontIcon="eco" (click)="setSymbol('eco','#b6cc87')"></mat-icon> <mat-icon [style.color]="'#b6cc87'" fontIcon="eco" (click)="canUseSymbol('eco','#b6cc87') == 'enable' ? setSymbol('eco','#b6cc87') : ''" [ngClass]="canUseSymbol('eco','#b6cc87')"></mat-icon>
<mat-icon [style.color]="'#d0bbdb'" fontIcon="play_arrow" (click)="setSymbol('play_arrow','#d0bbdb')"></mat-icon> <mat-icon [style.color]="'#d0bbdb'" fontIcon="play_arrow" (click)="canUseSymbol('play_arrow','#d0bbdb') == 'enable' ? setSymbol('play_arrow','#d0bbdb') : ''" [ngClass]="canUseSymbol('play_arrow','#d0bbdb')"></mat-icon>
<mat-icon [style.color]="'#8b7e64'" fontIcon="remove" (click)="setSymbol('remove','#8b7e64')"></mat-icon> <mat-icon [style.color]="'#8b7e64'" fontIcon="remove" (click)="canUseSymbol('remove','#8b7e64') == 'enable' ? setSymbol('remove','#8b7e64') : ''" [ngClass]="canUseSymbol('remove','#8b7e64')"></mat-icon>
</div> </div>
<div class="piece-symbolchoice-symbols"> <div class="piece-symbolchoice-symbols">
<mat-icon [style.color]="'#d79297'" fontIcon="square" (click)="setSymbol('square','#d79297')"></mat-icon> <mat-icon [style.color]="'#d79297'" fontIcon="square" (click)="canUseSymbol('square','#d79297') == 'enable' ? setSymbol('square','#d79297') : ''" [ngClass]="canUseSymbol('square','#d79297')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="setSymbol('square','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="canUseSymbol('square','#9ad5ec') == 'enable' ? setSymbol('square','#9ad5ec') : ''" [ngClass]="canUseSymbol('square','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#e9ec54'" fontIcon="square" (click)="setSymbol('square','#e9ec54')"></mat-icon> <mat-icon [style.color]="'#e9ec54'" fontIcon="square" (click)="canUseSymbol('square','#e9ec54') == 'enable' ? setSymbol('square','#e9ec54') : ''" [ngClass]="canUseSymbol('square','#e9ec54')"></mat-icon>
<mat-icon [style.color]="'#f5cee3'" fontIcon="square" (click)="setSymbol('square','#f5cee3')"></mat-icon> <mat-icon [style.color]="'#f5cee3'" fontIcon="square" (click)="canUseSymbol('square','#f5cee3') == 'enable' ? setSymbol('square','#f5cee3') : ''" [ngClass]="canUseSymbol('square','#f5cee3')"></mat-icon>
<mat-icon [style.color]="'#d3d2d2'" fontIcon="square" (click)="setSymbol('square','#d3d2d2')"></mat-icon> <mat-icon [style.color]="'#d3d2d2'" fontIcon="square" (click)="canUseSymbol('square','#d3d2d2') == 'enable' ? setSymbol('square','#d3d2d2') : ''" [ngClass]="canUseSymbol('square','#d3d2d2')"></mat-icon>
<mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="setSymbol('square','#9ad5ec')"></mat-icon> <mat-icon [style.color]="'#9ad5ec'" fontIcon="square" (click)="canUseSymbol('square','#9ad5ec') == 'enable' ? setSymbol('square','#9ad5ec') : ''" [ngClass]="canUseSymbol('square','#9ad5ec')"></mat-icon>
<mat-icon [style.color]="'#b6cc87'" fontIcon="square" (click)="setSymbol('square','#b6cc87')"></mat-icon> <mat-icon [style.color]="'#b6cc87'" fontIcon="square" (click)="canUseSymbol('square','#b6cc87') == 'enable' ? setSymbol('square','#b6cc87') : ''" [ngClass]="canUseSymbol('square','#b6cc87')"></mat-icon>
<mat-icon [style.color]="'#d0bbdb'" fontIcon="square" (click)="setSymbol('square','#d0bbdb')"></mat-icon> <mat-icon [style.color]="'#d0bbdb'" fontIcon="square" (click)="canUseSymbol('square','#d0bbdb') == 'enable' ? setSymbol('square','#d0bbdb') : ''" [ngClass]="canUseSymbol('square','#d0bbdb')"></mat-icon>
<mat-icon [style.color]="'#8b7e64'" fontIcon="square" (click)="setSymbol('square','#8b7e64')"></mat-icon> <mat-icon [style.color]="'#8b7e64'" fontIcon="square" (click)="canUseSymbol('square','#8b7e64') == 'enable' ? setSymbol('square','#8b7e64') : ''" [ngClass]="canUseSymbol('square','#8b7e64')"></mat-icon>
</div> </div>
</div> </div>
...@@ -82,18 +82,17 @@ ...@@ -82,18 +82,17 @@
<div class="piece-prerequires-prerequires"> <div class="piece-prerequires-prerequires">
<label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label> <label class="piece-prerequires-title">{{'task_prerequire_antecedents_title' | translate}}</label>
<div class="piece-prerequires-form"> <div class="piece-prerequires-form">
<div style="text-align: center;" *ngIf="j == 0">{{'task_prerequire_antecedents_err1' | translate}}</div>
<ng-container *ngIf="hasPossibleAntecedents()"> <ng-container *ngIf="hasPossibleAntecedents()">
<ng-container *ngFor="let inlineTask of role.tasks"> <ng-container *ngFor="let inlineTask of role.tasks">
<ng-container *ngFor="let element of inlineTask; let index = index"> <ng-container *ngFor="let element of inlineTask; let index = index">
<div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && index < j"> <div class="piece-prerequires-prerequires-element" *ngIf="element?.identifier && (task.identifier != element?.identifier) && element?.type != 'annexe'">
<input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/> <input name="antecedent" type="checkbox" [checked]="isCheckedTask(element)" (change)="checkboxChangedTask($event, element)"/>
<label for="antecedent">{{element?.identifier}}</label> <label for="antecedent">{{element?.identifier}}</label>
</div> </div>
</ng-container> </ng-container>
</ng-container> </ng-container>
</ng-container> </ng-container>
<div style="text-align: center;" *ngIf="!hasPossibleAntecedents() && j != 0">{{'task_prerequire_antecedents_err2' | translate}}</div> <div style="text-align: center;" *ngIf="!hasPossibleAntecedents()">{{'task_prerequire_antecedents_err2' | translate}}</div>
</div> </div>
</div> </div>
<div class="piece-prerequires-ressources"> <div class="piece-prerequires-ressources">
......
...@@ -95,6 +95,11 @@ ...@@ -95,6 +95,11 @@
opacity: 0.75; opacity: 0.75;
} }
mat-icon.disable {
opacity: 0.2;
cursor: not-allowed;
}
&-header { &-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -178,6 +178,16 @@ export class TaskComponent implements OnInit { ...@@ -178,6 +178,16 @@ export class TaskComponent implements OnInit {
this.validTutorialPhase7(); this.validTutorialPhase7();
} }
canUseSymbol(symbol: string, symbolColor: string): string {
let res: string = 'enable';
this.role.tasks.forEach(inlineTasks => {
if (inlineTasks.some(task => task?.symbol.symbol == symbol && task?.symbol.color == symbolColor)) {
res = 'disable';
}
});
return res;
}
changeDisplayPrerequires(): void { changeDisplayPrerequires(): void {
if(this.displayPrequires == 'show') { if(this.displayPrequires == 'show') {
this.displayPrequires = 'hide'; this.displayPrequires = 'hide';
...@@ -366,7 +376,7 @@ export class TaskComponent implements OnInit { ...@@ -366,7 +376,7 @@ export class TaskComponent implements OnInit {
hasPossibleAntecedents(): boolean { hasPossibleAntecedents(): boolean {
let res = false; let res = false;
this.role.tasks.forEach(inlineTask => { this.role.tasks.forEach(inlineTask => {
for(let i = 0; i < this.j; i++) { for(let i = 0; i < inlineTask.length; i++) {
if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) { if (inlineTask[i]?.identifier && (this.task.identifier != inlineTask[i]?.identifier)) {
res = true; res = true;
} }
...@@ -388,7 +398,9 @@ export class TaskComponent implements OnInit { ...@@ -388,7 +398,9 @@ export class TaskComponent implements OnInit {
} }
validTutorialPhase6(): void { validTutorialPhase6(): void {
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 6) { if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 6
&& this.scenario.missions[0].roles[0].tasks[0].some(task => task?.objective)
&& this.scenario.missions[0].roles[1].tasks[0].some(task => task?.objective)) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial')); this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase(); this.tutorialService.validPhase();
} }
...@@ -396,7 +408,11 @@ export class TaskComponent implements OnInit { ...@@ -396,7 +408,11 @@ export class TaskComponent implements OnInit {
validTutorialPhase7(): void { validTutorialPhase7(): void {
if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 7 if (!this.tutorialService.optionnalPhase && !this.tutorialService.phaseDone[this.tutorialService.phase-1] && this.tutorialService.isActive && this.tutorialService.phase == 7
&& this.task.symbol.symbol && (this.task.prerequireTasks.length > 0 || this.task.prerequireRessources.length > 0)) { && this.task.symbol.symbol && (this.task.prerequireTasks.length > 0 || this.task.prerequireRessources.length > 0)
&& this.scenario.missions[0].roles[0].tasks[0].some(task => task?.symbol.symbol && (task.prerequireTasks.length > 0 || task.prerequireRessources.length > 0))
&& this.scenario.missions[0].roles[1].tasks[0].some(task => task?.symbol.symbol && (task.prerequireTasks.length > 0 || task.prerequireRessources.length > 0))) {
this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial')); this.scenario.traces.push(new Trace(this.scenario.traces.length, 'valid_phase', undefined, undefined, 'phase_'+this.tutorialService.phase, 'Tutorial'));
this.tutorialService.validPhase(); this.tutorialService.validPhase();
} }
......
...@@ -176,8 +176,7 @@ ...@@ -176,8 +176,7 @@
"task_prerequire_label": "Prerequisites", "task_prerequire_label": "Prerequisites",
"task_prerequire_tooltip": "Prerequisites for this task", "task_prerequire_tooltip": "Prerequisites for this task",
"task_prerequire_antecedents_title": "Antecedents", "task_prerequire_antecedents_title": "Antecedents",
"task_prerequire_antecedents_err1": "The first task in the line cannot have an antecedent", "task_prerequire_antecedents_err2": "Please first input identifiers for the tasks",
"task_prerequire_antecedents_err2": "Please first input identifiers for the preceding tasks",
"task_prerequire_ressource_title": "Resources & Skills", "task_prerequire_ressource_title": "Resources & Skills",
"task_transform_tooltip": "Change the type of this tile.", "task_transform_tooltip": "Change the type of this tile.",
"task_transform_normalTask": "Convert to Task", "task_transform_normalTask": "Convert to Task",
...@@ -276,24 +275,24 @@ ...@@ -276,24 +275,24 @@
"tutorial_phase": "Phase", "tutorial_phase": "Phase",
"tutorial_back": "Back to the classic tutorial", "tutorial_back": "Back to the classic tutorial",
"tutorial_optionnal": "Optional features to enhance your scenario", "tutorial_optionnal": "Optional features to enhance your scenario",
"tutorial_phase_1_title": "1. Navigate in the RLG Maker: ", "tutorial_phase_1_title": "1. Navigate in the RLG Maker. Several options are available: ",
"tutorial_phase_1": "- Move up and down: Hold the right mouse button and drag on the page, or swipe two fingers on the touchpad (up to scroll down and vice versa to scroll up). Alternatively, click on the mini-map area where you want to move.", "tutorial_phase_1": "- Hold down the left mouse button and move around the page\n- use the arrow keys on the keyboard\n- drag the gray area of the minimap to the location where you want to navigate\n- With the pad: hold down the left click + slide a finger on the pad OR double tap while holding down the 2nd tap to move around",
"tutorial_phase_2_title": "2. Navigate in the RLG Maker:", "tutorial_phase_2_title": "2. Zoom in or zoom out:",
"tutorial_phase_2": "- Zoom in or out: use the mouse wheel or spread 2 fingers on a touchpad to zoom in and pinch them together to zoom out. Another option: use the zoom buttons at the bottom right of the page.", "tutorial_phase_2": "- use the mouse scroll wheel\n- on a touchpad, spread two fingers to zoom in and bring them together to zoom out\n- use the zoom buttons at the bottom right of the page",
"tutorial_phase_3_title": "3. Define pedagogical objectives and context:", "tutorial_phase_3_title": "3. Define pedagogical objectives and context:",
"tutorial_phase_3": "Fill the tiles from left to right. There is no priority order for tiles in the same column.", "tutorial_phase_3": "Fill the 4 tiles from left to right. There is no priority order for tiles in the same column.",
"tutorial_phase_4_title": "4. Define roles:", "tutorial_phase_4_title": "4. Define roles:",
"tutorial_phase_4": "Choose the different roles present in your scenario. They are arranged in the same column, so the 2nd one is placed below the 1st. IMPORTANT: roles should perform tasks together (discussion, action, exchange of elements) at 1 or more moments.", "tutorial_phase_4": "Choose the different roles present in your scenario. They are arranged in the same column, so the 2nd one is placed below the 1st.\nIMPORTANT: roles should perform tasks together (discussion, action, exchange of elements) at 1 or more moments.",
"tutorial_phase_5_title": "5. In the order of your choice: choose and name quests & define quest rewards:", "tutorial_phase_5_title": "5. In the order of your choice: choose and name quests & define quest rewards:",
"tutorial_phase_5": "Give a name to the quest for each role. What will they do in a few words? What will the role obtain at the end of their quest? Unlock a new quest, obtain an item, improve skills in a domain, etc.", "tutorial_phase_5": "Give a name to the quest for each role. What will they do in a few words?\nWhat will the role obtain at the end of their quest?\nUnlock a new quest, obtain an item, improve skills in a domain, etc.",
"tutorial_phase_6_title": "6. Define tasks for each role:", "tutorial_phase_6_title": "6. Define tasks for each role:",
"tutorial_phase_6": "Define all actions to be taken to achieve the pedagogical objectives defined earlier for each role.", "tutorial_phase_6": "Define all actions to be taken to achieve the pedagogical objectives defined earlier for each role.",
"tutorial_phase_7_title": "7. In the order of your choice: highlight common tasks, identify prerequisites & estimate task duration:", "tutorial_phase_7_title": "7. In the order of your choice: highlight common tasks, identify prerequisites & estimate task duration:",
"tutorial_phase_7": "For each task done with another role, click on the top right of that task and choose the same symbol for tasks performed simultaneously. Identify the order of execution of tasks for the same role. Click on the 'prerequisites' button for the task and select the task(s) necessary to execute it. If a task is to be done after another, it should be placed in the column to its right. If an action is quick to perform, it will take 1 Unit of Time (UT), setting a larger UT will increase the size of the task. This ensures that common tasks can be performed simultaneously and that scenarios have the same duration.", "tutorial_phase_7": "- For each task done with another role, click on the top right of that task and choose the same symbol for tasks performed simultaneously\n- Identify the order of execution of tasks for the same role. Click on the 'prerequisites' button for the task and select the task(s) necessary to execute it\n- If an action is quick to perform, it will take 1 Time Unit (TU), setting a larger TU will increase the size of the task\nThis ensures that common tasks can be performed simultaneously and that scenarios have the same duration.",
"tutorial_phase_8_title": "8. Order the tasks:", "tutorial_phase_8_title": "8. Order the tasks:",
"tutorial_phase_8": "If not done in the previous phase, move tasks based on prerequisites using the arrows that appear when hovering over a task. Tasks in the same column have no execution order. Those in the first column have no prerequisites and can be executed at the beginning of the game.", "tutorial_phase_8": "If not done in the previous phase, move tasks based on prerequisites using the arrows that appear when hovering over a task. If a task is to be done after another, it should be placed in the column to its right. Tasks in the same column have no execution order. Those in the first column have no prerequisites and can be executed at the beginning of the game.",
"tutorial_phase_9_title": "9. Add side tasks.", "tutorial_phase_9_title": "9. Add side tasks:",
"tutorial_phase_9": "Quick and unnecessary tasks to achieve pedagogical objectives, they serve to occupy a role while another finishes their tasks to reach a common task together or even to achieve equivalent playtime between roles. A player can do all side tasks quickly or none at all; it should not be a blocking factor for the scenario.", "tutorial_phase_9": "Quick and unnecessary tasks to achieve pedagogical objectives, they are used to occupy a role while another finishes their tasks to reach a common task together or even to achieve equivalent playtime between roles. A player can do all side tasks quickly or none at all; it should not be a blocking factor for the scenario.",
"tutorial_optionnal_event": "Random Event", "tutorial_optionnal_event": "Random Event",
"tutorial_optionnalPhase_event": "These are useful if you want to add an element of unpredictability to your scenario, making the game more replayable. To add one, click on the '+' as if adding a Task and select 'Random Event'.", "tutorial_optionnalPhase_event": "These are useful if you want to add an element of unpredictability to your scenario, making the game more replayable. To add one, click on the '+' as if adding a Task and select 'Random Event'.",
"tutorial_optionnal_repeatTask": "Repeated Task", "tutorial_optionnal_repeatTask": "Repeated Task",
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
"dialog_create_content": "Êtes vous sûr de vouloir créer", "dialog_create_content": "Êtes vous sûr de vouloir créer",
"dialog_delete_title": "Supprimer l'élément", "dialog_delete_title": "Supprimer l'élément",
"dialog_delete_content1": "Êtes vous sûr de vouloir supprimer", "dialog_delete_content1": "Êtes vous sûr de vouloir supprimer",
"dialog_delete_content2": "et tout ce que ce la implique ?", "dialog_delete_content2": "et tout ce que cela implique ?",
"dialog_save_title": "Télécharger le scénario", "dialog_save_title": "Télécharger le scénario",
"dialog_save_content": "Nom du projet :", "dialog_save_content": "Nom du projet :",
"dialog_save_placeholder": "Mon Scénario", "dialog_save_placeholder": "Mon Scénario",
...@@ -176,8 +176,7 @@ ...@@ -176,8 +176,7 @@
"task_prerequire_label": "Prérequis", "task_prerequire_label": "Prérequis",
"task_prerequire_tooltip": "Prérequis pour effectuer cette tâche", "task_prerequire_tooltip": "Prérequis pour effectuer cette tâche",
"task_prerequire_antecedents_title": "Antécédents", "task_prerequire_antecedents_title": "Antécédents",
"task_prerequire_antecedents_err1": "La première tâche de la ligne ne peut pas avoir d'antécédent", "task_prerequire_antecedents_err2": "Veuillez d'abord entrer des identifiants aux tâches",
"task_prerequire_antecedents_err2": "Veuillez d'abord entrer des identifiants aux tâches précédentes",
"task_prerequire_ressource_title": "Ressources & Compétences", "task_prerequire_ressource_title": "Ressources & Compétences",
"task_transform_tooltip": "Changer le type de cette tuile.", "task_transform_tooltip": "Changer le type de cette tuile.",
"task_transform_normalTask": "Transformer en Tâche", "task_transform_normalTask": "Transformer en Tâche",
...@@ -276,22 +275,22 @@ ...@@ -276,22 +275,22 @@
"tutorial_phase": "Phase", "tutorial_phase": "Phase",
"tutorial_back": "Retour au tutoriel classique", "tutorial_back": "Retour au tutoriel classique",
"tutorial_optionnal": "Options facultatives pour enrichir son scénario", "tutorial_optionnal": "Options facultatives pour enrichir son scénario",
"tutorial_phase_1_title": "1. Se déplacer dans le RLG Maker :", "tutorial_phase_1_title": "1. Se déplacer dans le RLG Maker. Plusieurs options au choix :",
"tutorial_phase_1": "- Bouger de haut en bas : maintenez le clic droit de la souris et déplacez-vous dans la page ou glissez 2 doigts sur le pad (de bas en haut pour descendre et inversement pour monter). Autre solution : cliquez sur la zone de la mini map où vous souhaitez vous déplacer.", "tutorial_phase_1": "- maintenez le clic gauche de la souris et déplacez-vous dans la page\n- utilisez les flèches du clavier\n- faites glisser la zone grise de la minimap où vous souhaitez vous déplacer\n- Avec le pad : maintenir le clic gauche + glisser un doigt sur le pad OU double tap en maintenant le 2e tap pour se déplacer",
"tutorial_phase_2_title": "2. Se déplacer dans le RLG Maker :", "tutorial_phase_2_title": "2. Zoomer ou dézoomer :",
"tutorial_phase_2": "- Zoomer ou dézoomer : utilisez la mollette de la souris ou sur un pad écartez 2 doigts pour zoomer et rapprochez-les pour dézoomer. Autre solution : utilisez les boutons de zoom en bas à droite de la page.", "tutorial_phase_2": "- utilisez la mollette de la souris\n- sur un pad, écartez 2 doigts pour zoomer et rapprochez-les pour dézoomer\n- utilisez les boutons de zoom en bas à droite de la page",
"tutorial_phase_3_title": "3. Définir les objectifs pédagogiques et le contexte :", "tutorial_phase_3_title": "3. Définir les objectifs pédagogiques et le contexte :",
"tutorial_phase_3": "Remplir les tuiles de gauche à droite. Il n'y a pas d'ordre de priorité pour des tuiles dans une même colonne.", "tutorial_phase_3": "Remplir les 4 tuiles de gauche à droite. Il n'y a pas d'ordre de priorité pour des tuiles dans une même colonne.",
"tutorial_phase_4_title": "4. Définir les rôles :", "tutorial_phase_4_title": "4. Définir les rôles :",
"tutorial_phase_4": "Choisir les différents rôles présents dans votre scénario. Ils sont disposés dans une même colonne, le 2e est donc placé plus bas en dessous du 1er. IMPORTANT : les rôles devront faire des tâches ensemble (discussion, action, échange d'éléments) à 1 ou plusieurs moments.", "tutorial_phase_4": "Choisir les différents rôles présents dans votre scénario. Ils sont disposés dans une même colonne, le 2e est donc placé plus bas en dessous du 1er.\nIMPORTANT : les rôles devront faire des tâches ensemble (discussion, action, échange d'éléments) à 1 ou plusieurs moments.",
"tutorial_phase_5_title": "5. Dans l'ordre de votre choix : choisir et nommer les quêtes & définir les récompenses de la quête :", "tutorial_phase_5_title": "5. Dans l'ordre de votre choix : choisir et nommer les quêtes & définir les récompenses de la quête :",
"tutorial_phase_5": "Donner un nom à la quête de chaque rôle. Que va-t-il faire en quelques mots ? Que va obtenir le rôle à la fin de sa quête ? Débloquer une nouvelle quête, obtenir un objet, monter en compétence dans un domaine, etc.", "tutorial_phase_5": "Donnez un nom à la quête de chaque rôle. Que va-t-il faire en quelques mots ?\nQue va obtenir le rôle à la fin de sa quête ?\nDébloquer une nouvelle quête, obtenir un objet, monter en compétence dans un domaine, etc.",
"tutorial_phase_6_title": "6. Définir les tâches de chaque rôle :", "tutorial_phase_6_title": "6. Définir les tâches de chaque rôle :",
"tutorial_phase_6": "Définir toutes les actions à effectuer pour atteindre les objectifs pédagogiques définis plus tôt pour chaque rôle.", "tutorial_phase_6": "Définissez toutes les actions à effectuer pour atteindre les objectifs pédagogiques définis plus tôt pour chaque rôle.",
"tutorial_phase_7_title": "7. Dans l'ordre de votre choix : mettre en évidence les tâches communes, identifier les prérequis & estimer la durée des tâches :", "tutorial_phase_7_title": "7. Dans l'ordre de votre choix : mettre en évidence les tâches communes, identifier les prérequis & estimer la durée des tâches :",
"tutorial_phase_7": "Pour chaque tâche faite avec un autre rôle, cliquez sur la case en haut à droite de cette tâche et choisir le même symbole pour les tâches réalisées simultanément. Identifier l'ordre d'exécution des tâches d'un même rôle. Cliquer sur le bouton «prérequis» de la tâche et sélectionner la ou les tâches nécessaires pour exécuter celle-ci. Si une tâche est à faire après une autre, elle doit être placée dans la colonne à sa droite. Si une action est rapide à effectuer elle prendra 1 Unité de Temps (UT), mettre un UT plus grande allongera la taille de la tâche. Ceci permet de vérifier que les tâches communes peuvent être effectuées simultanément et que les scénarios soient de durée identique.", "tutorial_phase_7": "- Pour chaque tâche faite avec un autre rôle, cliquez sur la case en haut à droite de cette tâche et choisir le même symbole pour les tâches réalisées simultanément.\n- Identifiez l'ordre d'exécution des tâches d'un même rôle. Cliquer sur le bouton «prérequis» de la tâche et sélectionner la ou les tâches nécessaires pour exécuter celle-ci\n- Si une action est rapide à effectuer elle prendra 1 Unité de Temps (UT), mettre une UT plus grande allongera la taille de la tâche.\nCeci permet de vérifier que les tâches communes peuvent être effectuées simultanément et que les scénarios soient de durée identique.",
"tutorial_phase_8_title": "8. Ordonner les tâches :", "tutorial_phase_8_title": "8. Ordonner les tâches :",
"tutorial_phase_8": "Si cela n'a pas été effectué à la phase précédente, déplacer les tâches en fonction des prérequis grâce aux flèches qui apparaissent au survol d'une tâche. Les tâches d'une même colonne n'ont pas d'ordre d'exécution. Celles de la première colonne n'ont aucun prérequis et peuvent être exécutées dès le début du jeu.", "tutorial_phase_8": "Si cela n'a pas été effectué à la phase précédente, déplacez les tâches en fonction des prérequis grâce aux flèches qui apparaissent au survol d'une tâche. Si une tâche est à faire après une autre, elle doit être placée dans la colonne à sa droite. Les tâches d'une même colonne n'ont pas d'ordre d'exécution. Celles de la première colonne n'ont aucun prérequis et peuvent être exécutées dès le début du jeu.",
"tutorial_phase_9_title": "9. Ajouter des tâches annexes.", "tutorial_phase_9_title": "9. Ajouter des tâches annexes.",
"tutorial_phase_9": "Tâches rapides et non nécessaires pour atteindre les objectifs pédagogiques, elles servent à occuper un rôle pendant qu'un autre finit ses tâches pour atteindre une tâche commune ensemble ou même pour obtenir un temps de jeu équivalent entre les rôles. Un joueur peut faire toutes les tâches annexes s'il est rapide comme n'en faire aucune, cela ne doit pas être bloquant pour le scénario.", "tutorial_phase_9": "Tâches rapides et non nécessaires pour atteindre les objectifs pédagogiques, elles servent à occuper un rôle pendant qu'un autre finit ses tâches pour atteindre une tâche commune ensemble ou même pour obtenir un temps de jeu équivalent entre les rôles. Un joueur peut faire toutes les tâches annexes s'il est rapide comme n'en faire aucune, cela ne doit pas être bloquant pour le scénario.",
"tutorial_optionnal_event": "Événement aléatoire", "tutorial_optionnal_event": "Événement aléatoire",
......
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