diff --git a/dmp-frontend/src/app/dataset-profile-form/form/form.component.html b/dmp-frontend/src/app/dataset-profile-form/form/form.component.html index f8583da0e..1109ac2ae 100644 --- a/dmp-frontend/src/app/dataset-profile-form/form/form.component.html +++ b/dmp-frontend/src/app/dataset-profile-form/form/form.component.html @@ -1,5 +1,5 @@ 
- - - + + -
- - - {{i + 1}}.{{form.get('pages').at(i).get('title').value}} -
- -
-
-
-
- -
-
-
-
+
+ + + {{i + + 1}}.{{form.get('pages').at(i).get('title').value}} +
+ +
+
+
+
+ +
+
+
+
-
- -
-
- +
+ +
+
+ -
- - - {{i + 1}}. {{form.get('sections').get(''+i).get('title').value}} -
- -
-
-
-
- -
-
-
-
+
+ + + {{i + 1}}. + {{form.get('sections').get(''+i).get('title').value}} +
+ +
+
+
+
+ +
+
+
+
-
- -
-
-
- +
+ +
+
+
+ +
- diff --git a/dmp-frontend/src/app/dataset-profile-form/form/form.component.ts b/dmp-frontend/src/app/dataset-profile-form/form/form.component.ts index 4ed709e25..4864c2c8d 100644 --- a/dmp-frontend/src/app/dataset-profile-form/form/form.component.ts +++ b/dmp-frontend/src/app/dataset-profile-form/form/form.component.ts @@ -12,7 +12,7 @@ import { MatDialog } from '@angular/material'; import { DatasetProfilePreviewerComponent } from '../previewer/dataset-profile-previewer.component'; @Component({ - selector: 'app-form-comp', + selector: 'app-form-component', templateUrl: './form.component.html', providers: [DatasetProfileAdmin, DatasetProfileService], styleUrls: ['./form.component.scss'] @@ -84,6 +84,7 @@ export class FormComponent implements OnInit { updateForm(id, data) { return this.datasetprofileAdmin.updateForm(id, data); } + onSubmit() { const data = this.form.value; diff --git a/dmp-frontend/src/app/datasets-admin-listing/dataset-admin.module.ts b/dmp-frontend/src/app/datasets-admin-listing/dataset-admin.module.ts index 9570196bc..798d4d21f 100644 --- a/dmp-frontend/src/app/datasets-admin-listing/dataset-admin.module.ts +++ b/dmp-frontend/src/app/datasets-admin-listing/dataset-admin.module.ts @@ -4,13 +4,13 @@ import { DatasetService } from '../services/dataset/dataset.service'; import { DynamicFormModule } from '../form/dynamic-form.module'; import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; import { DatasetAdminRoutes } from './dataset-admin.routes'; -import { DatasetAdminListingComponent } from './dataset-admin-listing.component'; import { CommonModule } from '@angular/common'; import { HttpClient, HttpClientModule } from '@angular/common/http'; import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { SharedModule } from '../shared/shared.module'; +import { DatasetProfileAdminListingComponent } from './dataset-profile-admin-listing.component'; @NgModule({ imports: [ CommonModule, @@ -30,11 +30,11 @@ import { SharedModule } from '../shared/shared.module'; ], declarations: [ - DatasetAdminListingComponent, + DatasetProfileAdminListingComponent, ], exports: [ - DatasetAdminListingComponent, + DatasetProfileAdminListingComponent, RouterModule ], providers: [ diff --git a/dmp-frontend/src/app/datasets-admin-listing/dataset-admin.routes.ts b/dmp-frontend/src/app/datasets-admin-listing/dataset-admin.routes.ts index 9ef78c520..96b86bd3f 100644 --- a/dmp-frontend/src/app/datasets-admin-listing/dataset-admin.routes.ts +++ b/dmp-frontend/src/app/datasets-admin-listing/dataset-admin.routes.ts @@ -1,7 +1,7 @@ -import { DatasetAdminListingComponent } from './dataset-admin-listing.component'; import { RouterModule, Routes } from '@angular/router'; import { AuthGuard } from '../shared/guards/auth.guard'; +import { DatasetProfileAdminListingComponent } from './dataset-profile-admin-listing.component'; export const DatasetAdminRoutes: Routes = [ - { path: '', component: DatasetAdminListingComponent, canActivate: [AuthGuard] }, + { path: '', component: DatasetProfileAdminListingComponent, canActivate: [AuthGuard] }, ]; diff --git a/dmp-frontend/src/app/datasets-admin-listing/dataset-admin-listing.component.html b/dmp-frontend/src/app/datasets-admin-listing/dataset-profile-admin-listing.component.html similarity index 100% rename from dmp-frontend/src/app/datasets-admin-listing/dataset-admin-listing.component.html rename to dmp-frontend/src/app/datasets-admin-listing/dataset-profile-admin-listing.component.html diff --git a/dmp-frontend/src/app/datasets-admin-listing/dataset-admin-listing.component.scss b/dmp-frontend/src/app/datasets-admin-listing/dataset-profile-admin-listing.component.scss similarity index 100% rename from dmp-frontend/src/app/datasets-admin-listing/dataset-admin-listing.component.scss rename to dmp-frontend/src/app/datasets-admin-listing/dataset-profile-admin-listing.component.scss diff --git a/dmp-frontend/src/app/datasets-admin-listing/dataset-admin-listing.component.ts b/dmp-frontend/src/app/datasets-admin-listing/dataset-profile-admin-listing.component.ts similarity index 94% rename from dmp-frontend/src/app/datasets-admin-listing/dataset-admin-listing.component.ts rename to dmp-frontend/src/app/datasets-admin-listing/dataset-profile-admin-listing.component.ts index b04732452..f87064e62 100644 --- a/dmp-frontend/src/app/datasets-admin-listing/dataset-admin-listing.component.ts +++ b/dmp-frontend/src/app/datasets-admin-listing/dataset-profile-admin-listing.component.ts @@ -16,12 +16,12 @@ import { DatasetProfileAdmin } from '../services/datasetProfileAdmin/datasetProf @Component({ - selector: 'app-dataset-admin-listing-component', - templateUrl: 'dataset-admin-listing.component.html', - styleUrls: ['./dataset-admin-listing.component.scss'], + selector: 'app-dataset-profile-admin-listing-component', + templateUrl: 'dataset-profile-admin-listing.component.html', + styleUrls: ['./dataset-profile-admin-listing.component.scss'], providers: [DatasetProfileAdmin, DataManagementPlanService] }) -export class DatasetAdminListingComponent implements OnInit { +export class DatasetProfileAdminListingComponent implements OnInit { @ViewChild(MatPaginator) _paginator: MatPaginator; @ViewChild(MatSort) sort: MatSort; diff --git a/dmp-frontend/src/app/services/dataset-profile.service.ts b/dmp-frontend/src/app/services/dataset-profile.service.ts index e61eb1c79..7accc74a5 100644 --- a/dmp-frontend/src/app/services/dataset-profile.service.ts +++ b/dmp-frontend/src/app/services/dataset-profile.service.ts @@ -21,29 +21,12 @@ export class DatasetProfileService { this.headers = this.headers.set('Accept', 'application/json'); } - fetchAllDatasetProfiles() { - // return this.restBase.get("datasetprofiles/getAll"); - } - getDatasetProfileById(datasetProfileID) { return this.datasetProfileAdmin.getDatasetProfileById(datasetProfileID); } - createDatasetProfile(datasetProfile) { - // return this.restBase.post("datasetprofile/create", datasetProfile); - } - - updateDatasetProfile(datasetProfile) { - // return this.restBase.post("datasetprofile/update", datasetProfile); - } - - delete(datasetProfile) { - // return this.restBase.post("datasetprofile/delete", datasetProfile); - } - queryAutocomplete(lookUpItem: RequestItem): Observable { return this.httpClient.post(HostConfiguration.Server + 'search/autocomplete', lookUpItem); } - }