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 project;
private String profile;
private String researchers;
private String creationTime;
private String organisations;
private String version;
private Integer numOfDatasets;
@ -55,12 +55,12 @@ public class DataManagementPlanListingModel implements DataModel<DMP> {
this.profile = profile;
}
public String getResearchers() {
return researchers;
public String getCreationTime() {
return creationTime;
}
public void setResearchers(String researchers) {
this.researchers = researchers;
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public String getOrganisations() {
@ -94,7 +94,7 @@ public class DataManagementPlanListingModel implements DataModel<DMP> {
this.project = entity.getProject().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.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.numOfDatasets = entity.getDataset().size();
}

View File

@ -11,13 +11,13 @@
<!-- Column Definition: 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>
</ng-container>
<!-- Column Definition: 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>
</ng-container>
@ -28,9 +28,9 @@
</ng-container> -->
<!-- Column Definition: Researchers -->
<ng-container cdkColumnDef="researchers">
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.RESEARCHERS' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.researchers}} </mat-cell>
<ng-container cdkColumnDef="creationTime">
<mat-header-cell *matHeaderCellDef mat-short-header="creationTime">{{'DMP-LISTING.COLUMNS.CREATION-TIME' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.creationTime | date:'shortDate'}} </mat-cell>
</ng-container>
<!-- Column Definition: Organisations -->
@ -41,13 +41,13 @@
<!-- Column Definition: 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>
</ng-container>
<!-- Column Definition: Datasets(count) -->
<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>
</ng-container>

View File

@ -22,13 +22,14 @@ import { Observable } from "rxjs/Observable";
providers: [DataManagementPlanService]
})
export class DataManagementPlanListingComponent implements OnInit {
@ViewChild(MatPaginator) _paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
@ViewChild(DataManagementPlanCriteriaComponent) criteria: DataManagementPlanCriteriaComponent;
dataSource: DataManagementPlanDataSource | null;
displayedColumns: String[] = ['name', 'project', 'researchers', 'organisations', 'version', 'numOfDatasets', 'actions'];
displayedColumns: String[] = ['name', 'project', 'creationTime', 'organisations', 'version', 'numOfDatasets', 'actions'];
constructor(
private dataManagementPlanService: DataManagementPlanService,
@ -46,6 +47,8 @@ export class DataManagementPlanListingComponent implements OnInit {
this.criteria.setRefreshCallback(() => this.refresh());
}
refresh() {
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 project: String;
public profile: String;
public researchers: String;
public creationTime: String;
public organisations: String;
public version: number;
@ -14,7 +14,7 @@ export class DataManagementPlanListingModel implements Serializable<DataManageme
this.label = item.label;
this.project = item.project;
this.profile = item.profile;
this.researchers = item.researchers;
this.creationTime = item.creationTime;
this.organisations = item.organisations;
this.version = item.version;

View File

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