Commit fad2855d authored by Romain DELEAU's avatar Romain DELEAU

Steps numbers

parent 7ea80a06
......@@ -21,7 +21,7 @@ matTooltipPosition="below" [matTooltipDisabled]="!tooltipService.activatedToolti
</div>
<div class="piece-form">
<div class="piece-form-title">Étape {{index+1}}</div>
<div class="piece-form-title">Étape {{getStepNumber()}}</div>
<mat-icon class="piece-form-comment" fontIcon="comment" *ngIf="step.comments.length > 0"></mat-icon>
<textarea [(ngModel)]="step.description" [style.background-image]="index == FirstStepIndex() ? urlIcon : ''"></textarea>
<div class="piece-form-duration">
......
......@@ -31,6 +31,16 @@ export class StepComponent implements OnInit {
this.mission.equalizeLengths();
}
getStepNumber(): number {
let number: number = 1;
for(let i = 0; i < this.index; i++) {
if (this.parent.chronologie[i] instanceof Step) {
number++;
}
}
return number;
}
durationChange(): void {
let beforeWidth: number = this.pieceWidth;
this.setPieceWidth();
......
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