Compare commits

...

2 Commits

4 changed files with 9 additions and 4 deletions

View File

@ -157,9 +157,9 @@
</button>
</div>
</div>
<div class="row mb-4 mt-4">
<div class="row mb-4 mt-4" *ngIf="formGroup && !viewOnly">
<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>

View File

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

View File

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

View File

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