no message

This commit is contained in:
Ioannis Kalyvas 2018-02-02 13:09:38 +02:00
parent cd8b338d06
commit ab73f2ad62
5 changed files with 20 additions and 17 deletions

View File

@ -18,7 +18,7 @@ public class DataManagementPlanListingModel implements DataModel<DMP> {
private String label; private String label;
private String project; private String project;
private String profile; private String profile;
private String researchers; private String creationTime;
private String organisations; private String organisations;
private String version; private String version;
private Integer numOfDatasets; private Integer numOfDatasets;
@ -55,12 +55,12 @@ public class DataManagementPlanListingModel implements DataModel<DMP> {
this.profile = profile; this.profile = profile;
} }
public String getResearchers() { public String getCreationTime() {
return researchers; return creationTime;
} }
public void setResearchers(String researchers) { public void setCreationTime(String creationTime) {
this.researchers = researchers; this.creationTime = creationTime;
} }
public String getOrganisations() { public String getOrganisations() {
@ -94,7 +94,7 @@ public class DataManagementPlanListingModel implements DataModel<DMP> {
this.project = entity.getProject().getLabel(); this.project = entity.getProject().getLabel();
if(entity.getProfile()!=null)this.profile = entity.getProfile().getLabel(); if(entity.getProfile()!=null)this.profile = entity.getProfile().getLabel();
this.organisations =LabelBuilder.getLabel(new DomainModelConverter<eu.eudat.entities.Organisation,Organisation>().fromDataModel(entity.getOrganisations().stream().collect(Collectors.toList()),Organisation.class)); this.organisations =LabelBuilder.getLabel(new DomainModelConverter<eu.eudat.entities.Organisation,Organisation>().fromDataModel(entity.getOrganisations().stream().collect(Collectors.toList()),Organisation.class));
this.researchers =LabelBuilder.getLabel(new DomainModelConverter<eu.eudat.entities.Researcher,Researcher>().fromDataModel(entity.getResearchers().stream().collect(Collectors.toList()),Researcher.class)); this.creationTime = entity.getCreated().toString();
this.version = ""+entity.getVersion(); this.version = ""+entity.getVersion();
this.numOfDatasets = entity.getDataset().size(); this.numOfDatasets = entity.getDataset().size();
} }

View File

@ -11,13 +11,13 @@
<!-- Column Definition: Name --> <!-- Column Definition: Name -->
<ng-container cdkColumnDef="name"> <ng-container cdkColumnDef="name">
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.NAME' | translate}}</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-short-header="name">{{'DMP-LISTING.COLUMNS.NAME' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row">{{row.label}}</mat-cell> <mat-cell *matCellDef="let row">{{row.label}}</mat-cell>
</ng-container> </ng-container>
<!-- Column Definition: Project --> <!-- Column Definition: Project -->
<ng-container cdkColumnDef="project"> <ng-container cdkColumnDef="project">
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.PROJECT' | translate}}</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-short-header="project">{{'DMP-LISTING.COLUMNS.PROJECT' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.project}} </mat-cell> <mat-cell *matCellDef="let row"> {{row.project}} </mat-cell>
</ng-container> </ng-container>
@ -28,9 +28,9 @@
</ng-container> --> </ng-container> -->
<!-- Column Definition: Researchers --> <!-- Column Definition: Researchers -->
<ng-container cdkColumnDef="researchers"> <ng-container cdkColumnDef="creationTime">
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.RESEARCHERS' | translate}}</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-short-header="creationTime">{{'DMP-LISTING.COLUMNS.CREATION-TIME' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.researchers}} </mat-cell> <mat-cell *matCellDef="let row"> {{row.creationTime | date:'shortDate'}} </mat-cell>
</ng-container> </ng-container>
<!-- Column Definition: Organisations --> <!-- Column Definition: Organisations -->
@ -41,13 +41,13 @@
<!-- Column Definition: Version --> <!-- Column Definition: Version -->
<ng-container cdkColumnDef="version"> <ng-container cdkColumnDef="version">
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.VERSION' | translate}}</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-short-header="version">{{'DMP-LISTING.COLUMNS.VERSION' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.version}}</mat-cell> <mat-cell *matCellDef="let row"> {{row.version}}</mat-cell>
</ng-container> </ng-container>
<!-- Column Definition: Datasets(count) --> <!-- Column Definition: Datasets(count) -->
<ng-container cdkColumnDef="numOfDatasets"> <ng-container cdkColumnDef="numOfDatasets">
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.DATASETS' | translate}}</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-short-header="numofdatasets">{{'DMP-LISTING.COLUMNS.DATASETS' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.numOfDatasets}}</mat-cell> <mat-cell *matCellDef="let row"> {{row.numOfDatasets}}</mat-cell>
</ng-container> </ng-container>

View File

@ -23,12 +23,13 @@ import { Observable } from "rxjs/Observable";
}) })
export class DataManagementPlanListingComponent implements OnInit { export class DataManagementPlanListingComponent implements OnInit {
@ViewChild(MatPaginator) _paginator: MatPaginator; @ViewChild(MatPaginator) _paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
@ViewChild(DataManagementPlanCriteriaComponent) criteria: DataManagementPlanCriteriaComponent; @ViewChild(DataManagementPlanCriteriaComponent) criteria: DataManagementPlanCriteriaComponent;
dataSource: DataManagementPlanDataSource | null; dataSource: DataManagementPlanDataSource | null;
displayedColumns: String[] = ['name', 'project', 'researchers', 'organisations', 'version', 'numOfDatasets', 'actions']; displayedColumns: String[] = ['name', 'project', 'creationTime', 'organisations', 'version', 'numOfDatasets', 'actions'];
constructor( constructor(
private dataManagementPlanService: DataManagementPlanService, private dataManagementPlanService: DataManagementPlanService,
@ -46,6 +47,8 @@ export class DataManagementPlanListingComponent implements OnInit {
this.criteria.setRefreshCallback(() => this.refresh()); this.criteria.setRefreshCallback(() => this.refresh());
} }
refresh() { refresh() {
this.dataSource = new DataManagementPlanDataSource(this.dataManagementPlanService, this._paginator, this.sort, this.languageService, this.snackBar, this.criteria, ); this.dataSource = new DataManagementPlanDataSource(this.dataManagementPlanService, this._paginator, this.sort, this.languageService, this.snackBar, this.criteria, );
} }

View File

@ -5,7 +5,7 @@ export class DataManagementPlanListingModel implements Serializable<DataManageme
public label: String; public label: String;
public project: String; public project: String;
public profile: String; public profile: String;
public researchers: String; public creationTime: String;
public organisations: String; public organisations: String;
public version: number; public version: number;
@ -14,7 +14,7 @@ export class DataManagementPlanListingModel implements Serializable<DataManageme
this.label = item.label; this.label = item.label;
this.project = item.project; this.project = item.project;
this.profile = item.profile; this.profile = item.profile;
this.researchers = item.researchers; this.creationTime = item.creationTime;
this.organisations = item.organisations; this.organisations = item.organisations;
this.version = item.version; this.version = item.version;

View File

@ -45,7 +45,7 @@
"NAME": "Name", "NAME": "Name",
"PROJECT": "Project", "PROJECT": "Project",
"PROFILE": "Profile", "PROFILE": "Profile",
"RESEARCHERS": "Researchers", "CREATION-TIME": "Creation Time",
"ORGANISATIONS": "Organisations", "ORGANISATIONS": "Organisations",
"VERSION": "Version", "VERSION": "Version",
"ACTIONS": "Actions", "ACTIONS": "Actions",