changed description template stepper labels

This commit is contained in:
Sofia Papacharalampous 2024-05-10 15:17:29 +03:00
parent 07ef69ac2d
commit eaff979b4b
2 changed files with 11 additions and 2 deletions

View File

@ -49,9 +49,9 @@
<mat-horizontal-stepper [linear]="true" #stepper class="stepper" (selectionChange)="onMatStepperSelectionChange($event)" style="padding-left: 8px; padding-right: 15px;">
<!-- IMPORTANT TO BE !INVALID (WHEN THE TEMPLATE IS FINALIZED THE CONTORLS ARE DISABLED) -->
<mat-step [label]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate" [completed]="(!formGroup.get('label').invalid && !formGroup.get('description').invalid && !formGroup.get('language').invalid)">
<!-- <ng-template matStepLabel>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate}}
</ng-template> -->
<mat-step [label]="generalInfoStepperLabel" [completed]="(!formGroup.get('label').invalid && !formGroup.get('description').invalid && !formGroup.get('language').invalid)">
<div class="col-9">
<div class="col">
<div class="col-12">
@ -169,7 +169,7 @@
</div> -->
</div>
</mat-step>
<mat-step [label]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TITLE' | translate" [completed]="formGroup.valid">
<mat-step [label]="fromStepperLabel" [completed]="formGroup.valid">
<div class="row">
<!-- TABLE -->

View File

@ -86,6 +86,15 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
previewPropertiesFormGroup: UntypedFormGroup = null;
finalPreviewDescriptionTemplatePersist: DescriptionTemplatePersist;
get generalInfoStepperLabel(): string {
return '1 ' + this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.TITLE');
}
get fromStepperLabel(): string {
return '2 ' + this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TITLE');
}
protected get canDelete(): boolean {
return !this.isDeleted && !this.isNew && this.hasPermission(this.authService.permissionEnum.DeleteDescriptionTemplate);
}