The DMPs on Dataset Editor (+ wizard) will have creation time subtitle and are ordered by creation time descended
This commit is contained in:
parent
116aa365c5
commit
476915b23c
|
@ -187,6 +187,7 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
|
||||||
this.id = entity.getId().toString();
|
this.id = entity.getId().toString();
|
||||||
this.label = entity.getLabel();
|
this.label = entity.getLabel();
|
||||||
this.groupId = entity.getGroupId();
|
this.groupId = entity.getGroupId();
|
||||||
|
this.creationTime = entity.getCreated();
|
||||||
this.associatedProfiles = entity.getAssociatedDmps().stream().map(item -> new AssociatedProfile().fromData(item)).collect(Collectors.toList());
|
this.associatedProfiles = entity.getAssociatedDmps().stream().map(item -> new AssociatedProfile().fromData(item)).collect(Collectors.toList());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ export class DatasetDmpSelector extends BaseComponent implements OnInit, IBreadC
|
||||||
initialItems: (extraData) => this.searchDmp(''),
|
initialItems: (extraData) => this.searchDmp(''),
|
||||||
displayFn: (item) => item['label'],
|
displayFn: (item) => item['label'],
|
||||||
titleFn: (item) => item['label'],
|
titleFn: (item) => item['label'],
|
||||||
|
subtitleFn: (item) => new Date(item['creationTime']).toISOString()
|
||||||
};
|
};
|
||||||
|
|
||||||
this.formGroup.get('dmp').valueChanges
|
this.formGroup.get('dmp').valueChanges
|
||||||
|
@ -71,7 +72,7 @@ export class DatasetDmpSelector extends BaseComponent implements OnInit, IBreadC
|
||||||
|
|
||||||
searchDmp(query: string): Observable<DmpListingModel[]> {
|
searchDmp(query: string): Observable<DmpListingModel[]> {
|
||||||
const fields: Array<string> = new Array<string>();
|
const fields: Array<string> = new Array<string>();
|
||||||
fields.push('asc');
|
fields.push('-created');
|
||||||
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
||||||
dmpDataTableRequest.criteria = new DmpCriteria();
|
dmpDataTableRequest.criteria = new DmpCriteria();
|
||||||
dmpDataTableRequest.criteria.status = DmpStatus.Draft;
|
dmpDataTableRequest.criteria.status = DmpStatus.Draft;
|
||||||
|
|
|
@ -92,6 +92,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
initialItems: (extraData) => this.searchDmp(''),
|
initialItems: (extraData) => this.searchDmp(''),
|
||||||
displayFn: (item) => this.getDatasetDisplay(item),
|
displayFn: (item) => this.getDatasetDisplay(item),
|
||||||
titleFn: (item) => item['label'],
|
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'),
|
// iconFn: (item) => this.publicMode ? '' : (item['status'] ? 'lock' : 'lock_open'),
|
||||||
// linkFn: (item) => this.publicMode ? '/explore-plans/overview/' + item['id'] : '/plans/overview/' + item['id']
|
// 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[]> {
|
searchDmp(query: string): Observable<DmpListingModel[]> {
|
||||||
const fields: Array<string> = new Array<string>();
|
const fields: Array<string> = new Array<string>();
|
||||||
fields.push('asc');
|
fields.push('-created');
|
||||||
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
||||||
dmpDataTableRequest.criteria = new DmpCriteria();
|
dmpDataTableRequest.criteria = new DmpCriteria();
|
||||||
dmpDataTableRequest.criteria.like = query;
|
dmpDataTableRequest.criteria.like = query;
|
||||||
|
|
|
@ -448,7 +448,8 @@
|
||||||
"FIRST-STEP": {
|
"FIRST-STEP": {
|
||||||
"TITLE": "Dataset Description Information",
|
"TITLE": "Dataset Description Information",
|
||||||
"DMP": "Data Management Plan",
|
"DMP": "Data Management Plan",
|
||||||
"PROFILE": "Dataset Description Template"
|
"PROFILE": "Dataset Description Template",
|
||||||
|
"SUB-TITLE": "Created At: "
|
||||||
},
|
},
|
||||||
"SECOND-STEP": {
|
"SECOND-STEP": {
|
||||||
"TITLE": "External References",
|
"TITLE": "External References",
|
||||||
|
|
Loading…
Reference in New Issue