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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
    }
+2 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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",