fix stepper labels of description-template-editor

This commit is contained in:
Sofia Papacharalampous 2024-05-13 14:19:02 +03:00
parent b0a156ce17
commit af502ea4be
2 changed files with 6 additions and 6 deletions

View File

@ -24,18 +24,14 @@
<!-- Steps Navigation --> <!-- Steps Navigation -->
<div id="stepper-navigation-wrapper"> <div id="stepper-navigation-wrapper">
<div class="col-12 d-flex" *ngIf="steps" id="stepper-navigation"> <div class="col-12 d-flex" *ngIf="steps" id="stepper-navigation">
<div class="col-7 bg-white" style="overflow: hidden; padding: 0px" id="progress-container"> <div class="col-7 bg-white" style="overflow: hidden; padding: 0px" id="progress-container">
<div id="progress" [ngStyle]="progressStyle"></div> <div id="progress" [ngStyle]="progressStyle"></div>
<div class="row h-100 progress-min-height"> <div class="row h-100 progress-min-height">
<div class="col text-center align-self-center" *ngFor="let step of steps; index as idx"> <div class="col text-center align-self-center" *ngFor="let step of steps; index as idx">
<span (click)="stepper.selectedIndex=idx" class="stepper-title-label" [ngClass]="{'stepper-title-label-locked': !isStepUnlocked(idx),'stepper-title-label-completed':idx < stepper.selectedIndex} "> <span (click)="stepper.selectedIndex=idx" class="stepper-title-label" [ngClass]="{'stepper-title-label-locked': !isStepUnlocked(idx),'stepper-title-label-completed':idx < stepper.selectedIndex} ">
<ng-container *ngIf="(step.completed &&(idx!=steps.length-1)) else numberLabel"> <ng-container *ngIf="(step.completed &&(idx!=steps.length-1))">
<mat-icon style="font-size:0.7em; height: 0px;">done</mat-icon> <mat-icon style="font-size:0.7em; height: 0px;">done</mat-icon>
</ng-container> </ng-container>
<ng-template #numberLabel>
{{idx+1}}
</ng-template>
{{step.label}} {{step.label}}
</span> </span>
</div> </div>
@ -266,7 +262,7 @@
</div> </div>
</div> </div>
</mat-step> </mat-step>
<mat-step [label]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE' | translate"> <mat-step [label]="previewLabel">
<ng-container *ngIf="formGroup"> <ng-container *ngIf="formGroup">
<div class="col-9"> <div class="col-9">
<div class="col"> <div class="col">

View File

@ -94,6 +94,10 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
get fromStepperLabel(): string { get fromStepperLabel(): string {
return '2 ' + this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TITLE'); return '2 ' + this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TITLE');
} }
get previewLabel(): string {
return '3 ' + this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE');
}
protected get canDelete(): boolean { protected get canDelete(): boolean {
return !this.isDeleted && !this.isNew && this.hasPermission(this.authService.permissionEnum.DeleteDescriptionTemplate); return !this.isDeleted && !this.isNew && this.hasPermission(this.authService.permissionEnum.DeleteDescriptionTemplate);