Commit 476915b2 authored by George Kalampokis's avatar George Kalampokis

The DMPs on Dataset Editor (+ wizard) will have creation time subtitle and are...

The DMPs on Dataset Editor (+ wizard) will have creation time subtitle and are ordered by creation time descended
parent 116aa365
......@@ -187,6 +187,7 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
this.id = entity.getId().toString();
this.label = entity.getLabel();
this.groupId = entity.getGroupId();
this.creationTime = entity.getCreated();
this.associatedProfiles = entity.getAssociatedDmps().stream().map(item -> new AssociatedProfile().fromData(item)).collect(Collectors.toList());
return this;
}
......
......@@ -50,6 +50,7 @@ export class DatasetDmpSelector extends BaseComponent implements OnInit, IBreadC
initialItems: (extraData) => this.searchDmp(''),
displayFn: (item) => item['label'],
titleFn: (item) => item['label'],
subtitleFn: (item) => new Date(item['creationTime']).toISOString()
};
this.formGroup.get('dmp').valueChanges
......@@ -71,7 +72,7 @@ export class DatasetDmpSelector extends BaseComponent implements OnInit, IBreadC
searchDmp(query: string): Observable<DmpListingModel[]> {
const fields: Array<string> = new Array<string>();
fields.push('asc');
fields.push('-created');
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
dmpDataTableRequest.criteria = new DmpCriteria();
dmpDataTableRequest.criteria.status = DmpStatus.Draft;
......
......@@ -92,6 +92,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
initialItems: (extraData) => this.searchDmp(''),
displayFn: (item) => this.getDatasetDisplay(item),
titleFn: (item) => item['label'],
subtitleFn: (item) => this.language.instant('DATASET-WIZARD.FIRST-STEP.SUB-TITLE') + new Date(item['creationTime']).toISOString()
// iconFn: (item) => this.publicMode ? '' : (item['status'] ? 'lock' : 'lock_open'),
// linkFn: (item) => this.publicMode ? '/explore-plans/overview/' + item['id'] : '/plans/overview/' + item['id']
};
......@@ -345,7 +346,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
searchDmp(query: string): Observable<DmpListingModel[]> {
const fields: Array<string> = new Array<string>();
fields.push('asc');
fields.push('-created');
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
dmpDataTableRequest.criteria = new DmpCriteria();
dmpDataTableRequest.criteria.like = query;
......
......@@ -448,7 +448,8 @@
"FIRST-STEP": {
"TITLE": "Dataset Description Information",
"DMP": "Data Management Plan",
"PROFILE": "Dataset Description Template"
"PROFILE": "Dataset Description Template",
"SUB-TITLE": "Created At: "
},
"SECOND-STEP": {
"TITLE": "External References",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment