Fix issue when inserting dataset status on dataset listing

This commit is contained in:
George Kalampokis 2020-03-18 11:19:53 +02:00
parent e68bc2a822
commit 672055f9ca
2 changed files with 3 additions and 2 deletions

View File

@ -16,8 +16,8 @@
<div class="col-10 gray-container" *ngIf="!isPublic" >
<h6 class="category-title">{{'CRITERIA.DATA-SETS.STATUS'| translate}}</h6>
<mat-radio-group aria-label="Select an option" [formControl]="formGroup.get('status')">
<mat-list-item><mat-radio-button checked value="null">{{ 'TYPES.DATASET-STATUS.ANY' | translate }}</mat-radio-button></mat-list-item>
<mat-list-item><mat-radio-button value="0" [checked]="status == 0">{{ 'TYPES.DATASET-STATUS.DRAFT' | translate }}</mat-radio-button></mat-list-item>
<mat-list-item><mat-radio-button value="null">{{ 'TYPES.DATASET-STATUS.ANY' | translate }}</mat-radio-button></mat-list-item>
<mat-list-item><mat-radio-button value="0" >{{ 'TYPES.DATASET-STATUS.DRAFT' | translate }}</mat-radio-button></mat-list-item>
<mat-list-item><mat-radio-button value="1">{{ 'TYPES.DATASET-STATUS.FINALISED' | translate }}</mat-radio-button></mat-list-item>
</mat-radio-group>
</div>

View File

@ -173,6 +173,7 @@ export class DatasetCriteriaComponent extends BaseCriteriaComponent implements O
.pipe(takeUntil(this._destroyed))
.subscribe(x => this.controlModified());
// if (this.criteria == null) { this.criteria = {}; }
this.formGroup.patchValue({'status': this.status !== undefined ? this.status : 'null'});
}
setCriteria(criteria: DatasetCriteria): void {