Prevent DMP Finalization if there are no finalized Dataset Descriptions (not just a warning)

This commit is contained in:
George Kalampokis 2020-02-26 14:14:50 +02:00
parent e26db8e4c4
commit 4e9b804744
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@
</div>
</mat-selection-list>
</div>
<mat-error *ngIf="getFinalizedDatasets().length == 0">
<mat-error *ngIf="getFinalizedDatasets().length === 0 && outputModel.datasetsToBeFinalized.length === 0">
{{'DMP-FINALISE-DIALOG.VALIDATION.AT-LEAST-ONE-DATASET-FINALISED' | translate}}
</mat-error>
</div>
@ -63,7 +63,7 @@
<div mat-dialog-actions class="d-flex justify-content-end">
<div class="col-auto">
<button mat-raised-button class="confirm" (click)="onSubmit()">{{ data.confirmButton }}</button>
<button mat-raised-button [disabled]="getFinalizedDatasets().length === 0 && outputModel.datasetsToBeFinalized.length === 0" class="confirm" (click)="onSubmit()">{{ data.confirmButton }}</button>
</div>
<div class="col-auto">
<button mat-raised-button cdkFocusInitial (click)="close()" class="cancel">{{ data.cancelButton }}</button>