diff --git a/dmp-admin/src/app/app.module.ts b/dmp-admin/src/app/app.module.ts index 615c8976a..ad2600e98 100644 --- a/dmp-admin/src/app/app.module.ts +++ b/dmp-admin/src/app/app.module.ts @@ -23,6 +23,7 @@ import { ResearcherService } from './services/researcher-service'; import { OrganisationService } from './services/organisation-service'; import { DmpProfileService } from './services/dmpprofile-service'; import { RegistryService } from './services/registry-service'; +import { DatarepoService } from './services/datarepo-service'; import { Toolbox } from './services/toolbox'; import { DataFilterPipe } from './pipes/data-filter.pipe'; @@ -33,6 +34,7 @@ import { ProjectTableFilterPipe } from './pipes/project-table-filter.pipe'; import { RegistryTableFilterPipe } from './pipes/registry-table-filter.pipe'; import { OrganisationTableFilterPipe } from './pipes/organisation-table-filter.pipe'; import { ResearcherTableFilterPipe } from './pipes/researcher-table-filter.pipe'; +import { DatarepoTableFilterPipe } from './pipes/datarepo-table-filter.pipe'; import { GooggleSignInComponent } from './login/googgle-sign-in/googgle-sign-in.component'; @@ -53,6 +55,7 @@ import { OrganisationEditorComponent } from './managers/organisation-editor/orga import { RegistryEditorComponent } from './managers/registry-editor/registry-editor.component'; import { ServiceEditorComponent } from './managers/service-editor/service-editor.component'; import { ResearcherEditorComponent } from './managers/researcher-editor/researcher-editor.component'; +import { DatareposEditorComponent } from './managers/datarepos-editor/datarepos-editor.component'; @@ -66,6 +69,7 @@ import { ResearcherEditorComponent } from './managers/researcher-editor/research RegistryTableFilterPipe, ServiceTableFilterPipe, ResearcherTableFilterPipe, + DatarepoTableFilterPipe, AppComponent, GooggleSignInComponent, @@ -82,7 +86,8 @@ import { ResearcherEditorComponent } from './managers/researcher-editor/research RegistryEditorComponent, ServiceEditorComponent, MainSignInComponent, - ResearcherEditorComponent + ResearcherEditorComponent, + DatareposEditorComponent ], imports: [ BrowserModule, @@ -97,7 +102,7 @@ import { ResearcherEditorComponent } from './managers/researcher-editor/research AppRouting ], providers: [ DatasetsServiceService, TokenService, DmpsServiceService, ResearcherService, - DialogService, DatasetProfileService, ProjectService, OrganisationService, + DialogService, DatasetProfileService, ProjectService, OrganisationService, DatarepoService, DmpProfileService, RegistryService, ServiceService, NativeLoginService, HttpModule, Toolbox, HttpClient, RestBase], bootstrap: [AppComponent] }) diff --git a/dmp-admin/src/app/datasets-viewer/datasets-viewer.component.ts b/dmp-admin/src/app/datasets-viewer/datasets-viewer.component.ts index 77cce589a..d64583558 100644 --- a/dmp-admin/src/app/datasets-viewer/datasets-viewer.component.ts +++ b/dmp-admin/src/app/datasets-viewer/datasets-viewer.component.ts @@ -112,6 +112,7 @@ export class DatasetsViewerComponent implements OnInit, AfterViewInit { + onFocusOutProfileWin($event, value:string) { this.nullSafeProfile(); if(this.haveChanges){ @@ -121,7 +122,7 @@ export class DatasetsViewerComponent implements OnInit, AfterViewInit { //create profile and a) assign it on data[] and on current profile b) assign it to dataset this.datasetProfileService.setDatasetProfile(this.profile).subscribe((resp) => { - /* + console.log("SERVICE RESPONSE: "); console.log(resp); console.log(resp.json()); @@ -141,13 +142,31 @@ export class DatasetsViewerComponent implements OnInit, AfterViewInit { simple_notifier("success",null,"Updated profile element"); }); }); -*/ + simple_notifier("success",null,"Updated profile element"); }); } else{ //this.getDatasetFromDataArray() + console.log("this.profile") + console.log(this.profile) + + console.log(this.profile) + this.profile.dataset = {"id": this.profile.dataset}; + + + this.datasetProfileService.setDatasetProfile(this.profile).subscribe( + response => { + simple_notifier("success",null,"Saved DMP Profile"); + console.log(response); + }, + err => { + simple_notifier("danger",null,"Could not save DMP Profile"); + console.log(err); + } + ); + } } @@ -365,4 +384,4 @@ export class DatasetsViewerComponent implements OnInit, AfterViewInit { } -} +} \ No newline at end of file diff --git a/dmp-admin/src/app/main-window/main-window.component.html b/dmp-admin/src/app/main-window/main-window.component.html index 54c8892b4..7749f27fb 100644 --- a/dmp-admin/src/app/main-window/main-window.component.html +++ b/dmp-admin/src/app/main-window/main-window.component.html @@ -23,11 +23,11 @@
  • DMP profiles
  • - -