This commit is contained in:
Sofia Papacharalampous 2024-07-01 15:29:06 +03:00
parent b0887cee06
commit ca80fbba56
4 changed files with 9 additions and 4 deletions

View File

@ -157,9 +157,9 @@
</button> </button>
</div> </div>
</div> </div>
<div class="row mb-4 mt-4"> <div class="row mb-4 mt-4" *ngIf="formGroup && !viewOnly">
<div class="col-12"> <div class="col-12">
<app-form-progress-indication class="mt-2" *ngIf="formGroup && !viewOnly" [formGroup]="formGroup" [checkVisibility]="true"></app-form-progress-indication> <app-form-progress-indication class="mt-2" [formGroup]="formGroup" [checkVisibility]="true"></app-form-progress-indication>
</div> </div>
</div> </div>
</div> </div>

View File

@ -242,7 +242,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
this.descriptionEditorService.setValidationErrorModel(this.editorModel.validationErrorModel); this.descriptionEditorService.setValidationErrorModel(this.editorModel.validationErrorModel);
if (this.editorModel.status == DescriptionStatus.Finalized || this.isDeleted || !this.canEdit) { if (this.editorModel.status == DescriptionStatus.Finalized || this.isDeleted || !this.canEdit) {
this.viewOnly = true; this.viewOnly = true;
this.isFinalized = true; this.isFinalized = this.editorModel.status == DescriptionStatus.Finalized;
this.formGroup.disable(); this.formGroup.disable();
} else { } else {
this.viewOnly = false; this.viewOnly = false;

View File

@ -188,7 +188,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row" *ngIf="this.step !== 0"> <div class="row" *ngIf="this.step !== 0 && formGroup && !viewOnly && canEdit">
<div class="col-12"> <div class="col-12">
<app-dmp-form-progress-indication class="col-12" *ngIf="formGroup && !formGroup.disabled && !lockStatus" [formGroup]="formGroup"></app-dmp-form-progress-indication> <app-dmp-form-progress-indication class="col-12" *ngIf="formGroup && !formGroup.disabled && !lockStatus" [formGroup]="formGroup"></app-dmp-form-progress-indication>
</div> </div>

View File

@ -68,6 +68,7 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
isNew = true; isNew = true;
isDeleted = false; isDeleted = false;
isFinalized = false; isFinalized = false;
viewOnly = false;
item: Dmp; item: Dmp;
selectedBlueprint: DmpBlueprint; selectedBlueprint: DmpBlueprint;
step: number = 0; step: number = 0;
@ -260,7 +261,11 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
this.sectionToFieldsMap = this.prepareErrorIndication(); this.sectionToFieldsMap = this.prepareErrorIndication();
if (this.editorModel.status == DmpStatus.Finalized || this.isDeleted) { if (this.editorModel.status == DmpStatus.Finalized || this.isDeleted) {
this.viewOnly = true;
this.isFinalized = this.editorModel.status == DmpStatus.Finalized;
this.formGroup.disable(); this.formGroup.disable();
} else {
this.viewOnly = false;
} }
} }