Commit 8a8a8778 authored by Romain DELEAU's avatar Romain DELEAU

add repeatMissionLimit in repeat siderpiece of tasks

parent 20e3bb43
...@@ -2,5 +2,6 @@ export class Repeat { ...@@ -2,5 +2,6 @@ export class Repeat {
iteration: number = 0; iteration: number = 0;
while: string = ''; while: string = '';
limitMissionRepeat: number = 1;
} }
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
<div class="piece-form-top-title">{{'annexeTask_title' | translate}}</div> <div class="piece-form-top-title">{{'annexeTask_title' | translate}}</div>
<mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon> <mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon>
<mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon> <mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon>
<span class="piece-form-top-repeat-off" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive && task.repeat.limitMissionRepeat == 1"></span>
</div> </div>
<textarea class="piece-form-content" [(ngModel)]="task.objective" (change)="editTrace($event,'Task_action')" [style.background-image]="(i == findFirstIndexOfTaskType('annexe')[0] && j == findFirstIndexOfTaskType('annexe')[1]) ? urlIcon : ''" <textarea class="piece-form-content" [(ngModel)]="task.objective" (change)="editTrace($event,'Task_action')" [style.background-image]="(i == findFirstIndexOfTaskType('annexe')[0] && j == findFirstIndexOfTaskType('annexe')[1]) ? urlIcon : ''"
*ngIf="!unityService.unity_isActive" *ngIf="!unityService.unity_isActive"
......
...@@ -262,6 +262,16 @@ ...@@ -262,6 +262,16 @@
background-color: white; background-color: white;
border-radius: 50%; border-radius: 50%;
padding: 4px; padding: 4px;
&-off {
height: 3px;
width: 35px;
background-color: black;
top: 57px;
right: 19px;
position: absolute;
transform: rotateZ(45deg);
}
} }
&-symbol { &-symbol {
......
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
<div class="piece-form-top-title">{{'finalTask_title' | translate}}</div> <div class="piece-form-top-title">{{'finalTask_title' | translate}}</div>
<mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon> <mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon>
<mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon> <mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon>
<span class="piece-form-top-repeat-off" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive && task.repeat.limitMissionRepeat == 1"></span>
<button mat-button class="piece-form-top-symbol" (click)="changeDisplaySymbolChoice()" <button mat-button class="piece-form-top-symbol" (click)="changeDisplaySymbolChoice()"
[matTooltip]="translate.instant('task_common_tooltip')" [matTooltip]="translate.instant('task_common_tooltip')"
matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips"> matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips">
......
...@@ -303,6 +303,16 @@ ...@@ -303,6 +303,16 @@
border-radius: 50%; border-radius: 50%;
background-color: white; background-color: white;
padding: 4px; padding: 4px;
&-off {
height: 3px;
width: 35px;
background-color: black;
top: 57px;
right: 99px;
position: absolute;
transform: rotateZ(45deg);
}
} }
&-symbol { &-symbol {
......
...@@ -148,6 +148,7 @@ ...@@ -148,6 +148,7 @@
<div class="piece-form-top-title">{{'optionnalTask_title1' | translate}}<br>{{'optionnalTask_title2' | translate}}</div> <div class="piece-form-top-title">{{'optionnalTask_title1' | translate}}<br>{{'optionnalTask_title2' | translate}}</div>
<mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon> <mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon>
<mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon> <mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon>
<span class="piece-form-top-repeat-off" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive && task.repeat.limitMissionRepeat == 1"></span>
<button mat-button class="piece-form-top-symbol" (click)="changeDisplaySymbolChoice()" <button mat-button class="piece-form-top-symbol" (click)="changeDisplaySymbolChoice()"
[matTooltip]="translate.instant('task_common_tooltip')" [matTooltip]="translate.instant('task_common_tooltip')"
matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips"> matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips">
......
...@@ -314,6 +314,16 @@ ...@@ -314,6 +314,16 @@
border-radius: 50%; border-radius: 50%;
background-color: white; background-color: white;
padding: 4px; padding: 4px;
&-off {
height: 3px;
width: 35px;
background-color: black;
top: 57px;
right: 99px;
position: absolute;
transform: rotateZ(45deg);
}
} }
&-symbol { &-symbol {
......
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
<div class="piece-form-top-title">{{'randomEvent_title1' | translate}}<br>{{'randomEvent_title2' | translate}}</div> <div class="piece-form-top-title">{{'randomEvent_title1' | translate}}<br>{{'randomEvent_title2' | translate}}</div>
<mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon> <mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon>
<mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon> <mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon>
<span class="piece-form-top-repeat-off" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive && task.repeat.limitMissionRepeat == 1"></span>
<button mat-button class="piece-form-top-symbol" (click)="changeDisplaySymbolChoice()" <button mat-button class="piece-form-top-symbol" (click)="changeDisplaySymbolChoice()"
[matTooltip]="translate.instant('task_common_tooltip')" [matTooltip]="translate.instant('task_common_tooltip')"
matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips"> matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips">
......
...@@ -305,6 +305,16 @@ ...@@ -305,6 +305,16 @@
border-radius: 50%; border-radius: 50%;
background-color: white; background-color: white;
padding: 4px; padding: 4px;
&-off {
height: 3px;
width: 35px;
background-color: black;
top: 57px;
right: 99px;
position: absolute;
transform: rotateZ(45deg);
}
} }
&-symbol { &-symbol {
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
</div> </div>
<mat-icon class="piece-form-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon> <mat-icon class="piece-form-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon>
<mat-icon class="piece-form-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon> <mat-icon class="piece-form-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon>
<span class="piece-form-repeat-off" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive && task.repeat.limitMissionRepeat == 1"></span>
<mat-icon class="piece-form-character" fontIcon="person" *ngIf="task.characters.length > 0 && !unityService.unity_isActive" <mat-icon class="piece-form-character" fontIcon="person" *ngIf="task.characters.length > 0 && !unityService.unity_isActive"
[style.color]="task.characters.length == 1 ? task.characters[0].color : 'black'" [style.color]="task.characters.length == 1 ? task.characters[0].color : 'black'"
[style.background]="task.characters.length > 1 ? 'linear-gradient('+ task.characters[0].color +','+ task.characters[task.characters.length-1].color +')' : 'white'"></mat-icon> [style.background]="task.characters.length > 1 ? 'linear-gradient('+ task.characters[0].color +','+ task.characters[task.characters.length-1].color +')' : 'white'"></mat-icon>
......
...@@ -124,6 +124,16 @@ ...@@ -124,6 +124,16 @@
background-color: white; background-color: white;
padding: 4px; padding: 4px;
border-radius: 50%; border-radius: 50%;
&-off {
height: 3px;
width: 35px;
background-color: black;
bottom: 50px;
left: 99px;
position: absolute;
transform: rotateZ(45deg);
}
} }
&-character { &-character {
......
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
<div class="piece-form-top-title">{{'normalTask_title' | translate}}</div> <div class="piece-form-top-title">{{'normalTask_title' | translate}}</div>
<mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon> <mat-icon class="piece-form-top-comment" fontIcon="comment" *ngIf="task.comments.length > 0"></mat-icon>
<mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon> <mat-icon class="piece-form-top-repeat" fontIcon="refresh" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive"></mat-icon>
<span class="piece-form-top-repeat-off" *ngIf="(task.repeat.iteration > 0 || task.repeat.while != '') && !unityService.unity_isActive && task.repeat.limitMissionRepeat == 1"></span>
<button mat-button class="piece-form-top-symbol" (click)="changeDisplaySymbolChoice()" <button mat-button class="piece-form-top-symbol" (click)="changeDisplaySymbolChoice()"
[matTooltip]="translate.instant('task_common_tooltip')" [matTooltip]="translate.instant('task_common_tooltip')"
matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips"> matTooltipPosition="above" [matTooltipDisabled]="!tooltipService.activatedTooltips">
......
...@@ -311,6 +311,16 @@ ...@@ -311,6 +311,16 @@
border-radius: 50%; border-radius: 50%;
background-color: white; background-color: white;
padding: 4px; padding: 4px;
&-off {
height: 3px;
width: 35px;
background-color: black;
top: 57px;
right: 99px;
position: absolute;
transform: rotateZ(45deg);
}
} }
&-symbol { &-symbol {
......
...@@ -6,7 +6,7 @@ matTooltipPosition="before" [matTooltipDisabled]="!tooltipService.activatedToolt ...@@ -6,7 +6,7 @@ matTooltipPosition="before" [matTooltipDisabled]="!tooltipService.activatedToolt
<mat-icon fontIcon="refresh"></mat-icon> <mat-icon fontIcon="refresh"></mat-icon>
<div class="piece-form-header-for"> <div class="piece-form-header-for">
<label>{{'repeat_title1' | translate}}</label> <label>{{'repeat_title1' | translate}}</label>
<input type="text" [(ngModel)]="task.repeat.iteration" (change)="editTrace($event,'repeat_nbTimes')"/> <input type="text" min="1" [max]="task.repeat.limitMissionRepeat" [(ngModel)]="task.repeat.iteration" (change)="editTrace($event,'repeat_nbTimes')"/>
<label>{{'repeat_title2' | translate}}</label> <label>{{'repeat_title2' | translate}}</label>
</div> </div>
</div> </div>
...@@ -14,5 +14,10 @@ matTooltipPosition="before" [matTooltipDisabled]="!tooltipService.activatedToolt ...@@ -14,5 +14,10 @@ matTooltipPosition="before" [matTooltipDisabled]="!tooltipService.activatedToolt
<label>{{'repeat_title3' | translate}}</label> <label>{{'repeat_title3' | translate}}</label>
<textarea [(ngModel)]="task.repeat.while" (change)="editTrace($event,'repeat_stopCondition')"></textarea> <textarea [(ngModel)]="task.repeat.while" (change)="editTrace($event,'repeat_stopCondition')"></textarea>
</div> </div>
<div class="piece-form-missionRepeatLimit">
<label>{{'repeat_missionRepeatLimit1' | translate}}</label>
<input type="text" min="1" [(ngModel)]="task.repeat.limitMissionRepeat" (change)="editTrace($event, 'repeat_missionRepeatLimit')"/>
<label>{{'repeat_missionRepeatLimit2' | translate}}</label>
</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -12,6 +12,16 @@ ...@@ -12,6 +12,16 @@
text-align: center; text-align: center;
margin: 10px 5px 10px 5px; margin: 10px 5px 10px 5px;
input {
width: 25px;
border: none;
border-radius: 10px;
background-color: white;
margin-left: 5px;
margin-right: 5px;
text-align: center;
}
&-header { &-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -28,17 +38,6 @@ ...@@ -28,17 +38,6 @@
position: relative; position: relative;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
input {
width: 25px;
border: none;
border-radius: 10px;
background-color: white;
margin-left: 5px;
margin-right: 5px;
text-align: center;
}
} }
} }
...@@ -61,5 +60,9 @@ ...@@ -61,5 +60,9 @@
background-size: 20%; background-size: 20%;
} }
} }
&-missionRepeatLimit {
margin-top: 5px;
}
} }
} }
\ No newline at end of file
...@@ -298,6 +298,8 @@ ...@@ -298,6 +298,8 @@
"repeat_title1": "Repeat", "repeat_title1": "Repeat",
"repeat_title2": "times", "repeat_title2": "times",
"repeat_title3": "or until:", "repeat_title3": "or until:",
"repeat_missionRepeatLimit1": "Can only be repeated",
"repeat_missionRepeatLimit2": "times in the mission",
"supplementaryRole_title": "Task related to the additional role", "supplementaryRole_title": "Task related to the additional role",
"supplementaryRole_tooltip": "Used to associate or not associate a task with an additional role.", "supplementaryRole_tooltip": "Used to associate or not associate a task with an additional role.",
......
...@@ -298,6 +298,8 @@ ...@@ -298,6 +298,8 @@
"repeat_title1": "Répéter", "repeat_title1": "Répéter",
"repeat_title2": "fois", "repeat_title2": "fois",
"repeat_title3": "ou jusqu'à ce que :", "repeat_title3": "ou jusqu'à ce que :",
"repeat_missionRepeatLimit1": "Ne peut être répétée que",
"repeat_missionRepeatLimit2": "fois dans la mission",
"supplementaryRole_title": "Tâche liée au rôle supplémentaire", "supplementaryRole_title": "Tâche liée au rôle supplémentaire",
"supplementaryRole_tooltip": "Sert à associer ou non une tâche à un Rôle supplémentaire.", "supplementaryRole_tooltip": "Sert à associer ou non une tâche à un Rôle supplémentaire.",
......
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