From 5b28cc8032060d023981dc3bfe1125571cc6fac2 Mon Sep 17 00:00:00 2001 From: Diamadis Tziotzios Date: Thu, 21 Dec 2017 11:39:17 +0200 Subject: [PATCH 1/3] no message --- .../app/dmps/editor/dmp-editor.component.html | 7 +++++ .../app/dmps/editor/dmp-editor.component.ts | 26 +++++++++++++------ .../DataManagementPlanModel.ts | 5 ++-- dmp-frontend/src/assets/lang/en.json | 1 + 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/dmp-frontend/src/app/dmps/editor/dmp-editor.component.html b/dmp-frontend/src/app/dmps/editor/dmp-editor.component.html index b178ece07..d204ac625 100644 --- a/dmp-frontend/src/app/dmps/editor/dmp-editor.component.html +++ b/dmp-frontend/src/app/dmps/editor/dmp-editor.component.html @@ -18,6 +18,13 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}} + + + diff --git a/dmp-frontend/src/app/dmps/editor/dmp-editor.component.ts b/dmp-frontend/src/app/dmps/editor/dmp-editor.component.ts index 1a7d8af2b..9a77e19ab 100644 --- a/dmp-frontend/src/app/dmps/editor/dmp-editor.component.ts +++ b/dmp-frontend/src/app/dmps/editor/dmp-editor.component.ts @@ -16,6 +16,9 @@ import { RequestItem } from "../../models/criteria/RequestItem"; import { DatasetProfileCriteria } from "../../models/criteria/dataset/DatasetProfileCriteria"; import { DataManagementPlanCriteriaComponent } from "../../shared/components/criteria/data-management-plan/dmp-criteria.component"; import { DatasetProfileModel } from "../../models/datasets/DatasetProfileModel"; +import { AutoCompleteConfiguration } from "../../shared/components/autocomplete/AutoCompleteConfiguration"; +import { ProjectCriteria } from "../../models/criteria/project/ProjectCriteria"; +import { ProjectService } from "../../services/project/project.service"; @@ -23,7 +26,7 @@ import { DatasetProfileModel } from "../../models/datasets/DatasetProfileModel"; selector: 'app-dmp-editor-component', templateUrl: 'dmp-editor.component.html', styleUrls: ['./dmp-editor.component.scss'], - providers: [DataManagementPlanService, ExternalSourcesService], + providers: [DataManagementPlanService, ExternalSourcesService, ProjectService], encapsulation: ViewEncapsulation.None }) export class DataManagementPlanEditorComponent implements AfterViewInit { @@ -40,8 +43,11 @@ export class DataManagementPlanEditorComponent implements AfterViewInit { filteredResearchers: ExternalSourcesItemModel[]; filteredProfiles: DatasetProfileModel[]; + projectAutoCompleteConfiguration: AutoCompleteConfiguration; + constructor( private dataManagementPlanService: DataManagementPlanService, + private projectService: ProjectService, private externalSourcesService: ExternalSourcesService, private route: ActivatedRoute, public snackBar: MatSnackBar, @@ -56,6 +62,10 @@ export class DataManagementPlanEditorComponent implements AfterViewInit { this.route.params.subscribe((params: Params) => { const itemId = params['id']; + let projectRequestItem: RequestItem = new RequestItem(); + projectRequestItem.criteria = new ProjectCriteria(); + this.projectAutoCompleteConfiguration = new AutoCompleteConfiguration(this.projectService.get.bind(this.projectService), projectRequestItem); + if (itemId != null) { this.isNew = false; this.dataManagementPlanService.getSingle(itemId).map(data => data as DataManagementPlanModel) @@ -114,11 +124,11 @@ export class DataManagementPlanEditorComponent implements AfterViewInit { } filterOrganisations(value: string): void { - + this.filteredOrganisations = undefined; if (value) { this.filteringOrganisationsAsync = true; - + this.externalSourcesService.searchDMPOrganizations(value).subscribe(items => { this.filteredOrganisations = items; this.filteringOrganisationsAsync = false; @@ -128,16 +138,16 @@ export class DataManagementPlanEditorComponent implements AfterViewInit { // }); }); - + } } filterResearchers(value: string): void { - + this.filteredResearchers = undefined; if (value) { this.filteringResearchersAsync = true; - + this.externalSourcesService.searchDMPResearchers(value).subscribe(items => { this.filteredResearchers = items; this.filteringResearchersAsync = false; @@ -151,11 +161,11 @@ export class DataManagementPlanEditorComponent implements AfterViewInit { } filterProfiles(value: string): void { - + this.filteredProfiles = undefined; if (value) { this.filteredProfilesAsync = true; - + // this.externalSourcesService.searchDMPProfiles(value).subscribe(items => { // this.filteredProfiles = items; // this.filteredProfilesAsync = false; diff --git a/dmp-frontend/src/app/models/data-managemnt-plans/DataManagementPlanModel.ts b/dmp-frontend/src/app/models/data-managemnt-plans/DataManagementPlanModel.ts index b52463f67..795ed42a0 100644 --- a/dmp-frontend/src/app/models/data-managemnt-plans/DataManagementPlanModel.ts +++ b/dmp-frontend/src/app/models/data-managemnt-plans/DataManagementPlanModel.ts @@ -9,13 +9,14 @@ import { OrganisationModel } from "../organisation/OrganisationModel"; import { ResearcherModel } from "../researcher/ResearcherModel"; import { JsonSerializer } from "../../utilities/JsonSerializer"; import { ProfileModel } from "../profile/ProfileModel"; +import { Status } from "../Status"; export class DataManagementPlanModel implements Serializable { public id: String; public label: String; public previous: String; public version: number; - public status: String; + public status: Status = Status.Active; public description: String; public project: ProjectModel; public organisations: OrganisationModel[] = []; @@ -63,7 +64,7 @@ export class DataManagementPlanModel implements Serializable Date: Thu, 21 Dec 2017 11:46:11 +0200 Subject: [PATCH 2/3] no message --- .../src/app/dataset-wizard/dataset-wizard.component.html | 2 +- dmp-frontend/src/app/datasets/dataset-listing.component.html | 2 +- .../src/app/datasets/editor/dataset-editor.component.html | 2 +- dmp-frontend/src/app/dmps/editor/dmp-editor.component.html | 2 +- dmp-frontend/src/assets/lang/en.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.html b/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.html index 40cde3caa..2e7507802 100644 --- a/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.html +++ b/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.html @@ -39,6 +39,6 @@ -
{{ formGroup.value | json }}
+ \ No newline at end of file diff --git a/dmp-frontend/src/app/datasets/dataset-listing.component.html b/dmp-frontend/src/app/datasets/dataset-listing.component.html index 3c0c089bd..1f3fe2f73 100644 --- a/dmp-frontend/src/app/datasets/dataset-listing.component.html +++ b/dmp-frontend/src/app/datasets/dataset-listing.component.html @@ -76,7 +76,7 @@ - \ No newline at end of file diff --git a/dmp-frontend/src/app/datasets/editor/dataset-editor.component.html b/dmp-frontend/src/app/datasets/editor/dataset-editor.component.html index 62b863a58..a06bf9cd1 100644 --- a/dmp-frontend/src/app/datasets/editor/dataset-editor.component.html +++ b/dmp-frontend/src/app/datasets/editor/dataset-editor.component.html @@ -101,5 +101,5 @@ -
{{ formGroup.value | json }}
+ \ No newline at end of file diff --git a/dmp-frontend/src/app/dmps/editor/dmp-editor.component.html b/dmp-frontend/src/app/dmps/editor/dmp-editor.component.html index d204ac625..1acdae8db 100644 --- a/dmp-frontend/src/app/dmps/editor/dmp-editor.component.html +++ b/dmp-frontend/src/app/dmps/editor/dmp-editor.component.html @@ -76,5 +76,5 @@ -
{{ formGroup.value | json }}
+ \ No newline at end of file diff --git a/dmp-frontend/src/assets/lang/en.json b/dmp-frontend/src/assets/lang/en.json index c98192e11..ecab6e81c 100644 --- a/dmp-frontend/src/assets/lang/en.json +++ b/dmp-frontend/src/assets/lang/en.json @@ -91,7 +91,7 @@ "DESCRIPTION": "Description", "ORGANISATIONS": "Organisations", "RESEARCHERS": "Researchers", - "PROFILES": "Profiles" + "PROFILES": "Available Profiles" }, "ACTIONS": { "SAVE": "Save", From 5e4a31748ec6525f396da5da780711e44365974a Mon Sep 17 00:00:00 2001 From: Diamadis Tziotzios Date: Thu, 21 Dec 2017 12:12:44 +0200 Subject: [PATCH 3/3] no message --- .../dataset-wizard.component.html | 33 ++++++++----------- dmp-frontend/src/assets/lang/en.json | 17 ++++++++++ 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.html b/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.html index 2e7507802..48ab634f8 100644 --- a/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.html +++ b/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.html @@ -2,43 +2,36 @@
- Dataset Profile Associations - + {{'DATASET-WIZARD.FIRST-STEP.TITLE' | translate}} + - +
- +
- Dataset Profile Basic Info + {{'DATASET-WIZARD.SECOND-STEP.TITLE' | translate}}
- - + +
- Dataset Profile Form - You are now done. + {{'DATASET-WIZARD.THIRD-STEP.TITLE' | translate}} +
- +
- + \ No newline at end of file diff --git a/dmp-frontend/src/assets/lang/en.json b/dmp-frontend/src/assets/lang/en.json index ecab6e81c..04f59362e 100644 --- a/dmp-frontend/src/assets/lang/en.json +++ b/dmp-frontend/src/assets/lang/en.json @@ -44,6 +44,23 @@ "VERSION": "Version" } }, + "DATASET-WIZARD": { + "FIRST-STEP": { + "TITLE": "Plan Information", + "DMP": "Data Management Plan", + "PROFILE": "Profile" + }, + "SECOND-STEP": { + "TITLE": "Dataset Information" + }, + "THIRD-STEP": { + "TITLE": "Definition" + }, + "ACTIONS": { + "NEXT": "Next", + "BACK": "Back" + } + }, "DATASET-LISTING": { "TITLE": "Datasets", "COLUMNS": {