dataset criteria & payload json object

This commit is contained in:
annampak 2017-12-18 15:24:10 +02:00
parent fa8881946e
commit 11fa25da40
3 changed files with 6 additions and 5 deletions

View File

@ -76,7 +76,7 @@ export class DatasetDataSource extends DataSource<DatasetListingModel> {
private _sort: MatSort,
private _languageService: TranslateService,
private _snackBar: MatSnackBar,
private _criteria: ProjectCriteriaComponent
private _criteria: DatasetCriteriaComponent
) {
super();
@ -113,7 +113,7 @@ export class DatasetDataSource extends DataSource<DatasetListingModel> {
setTimeout(() => {
this.isLoadingResults = false;
});
return result.data;
return result.payload;
})
.map(result => {
if (!result) { return []; }

View File

@ -33,7 +33,8 @@ export class HomepageComponent implements OnInit{
}
);
this.dashBoardService.getStatistics().subscribe(data =>{
this.dashBoardService.getStatistics().subscribe(results =>{
let data = results['payload'];
this.dashboardStatisticsData = new JsonSerializer<DashboardStatisticsModel>().fromJSONObject(data,DashboardStatisticsModel);
})

View File

@ -17,13 +17,13 @@
</div> -->
<div class="col-sm-6 col-md-2">
<mat-form-field>
<input matInput placeholder=" {{'CRITERIA.FORMS.NAME'| translate}}" name="name" [ngModel]="this.criteria.Name" (ngModelChange)="controlModified()">
<input matInput placeholder=" {{'CRITERIA.FORMS.NAME'| translate}}" name="datasetCriterianame" [ngModel]="this.criteria.Name" (ngModelChange)="controlModified()">
<mat-error *ngIf="getFormControl('name').errors?.backendError">{{baseErrorModel['Criteria.Name']}}</mat-error>
</mat-form-field>
</div>
<div class="col-sm-6 col-md-2">
<mat-form-field>
<input matInput placeholder=" {{'CRITERIA.FORMS.STATUS'| translate}}" name="name" [ngModel]="this.criteria.Status" (ngModelChange)="controlModified()">
<input matInput placeholder=" {{'CRITERIA.FORMS.STATUS'| translate}}" name="datasetCriteriastatus" [ngModel]="this.criteria.Status" (ngModelChange)="controlModified()">
<mat-error *ngIf="getFormControl('status').errors?.backendError">{{baseErrorModel['Criteria.Status']}}</mat-error>
</mat-form-field>
</div>