From 111cfe5c82875bd6e57fd476fa5cb605761d5c7f Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 9 Nov 2023 14:34:34 +0200 Subject: [PATCH] Add admin module for admin pages --- src/app/admin/admin.component.ts | 4 ++-- src/app/admin/admin.module.ts | 3 ++- src/app/app-routing.module.ts | 2 +- src/app/app.component.ts | 29 +++++++++++++++++------------ src/app/openaireLibrary | 2 +- 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/app/admin/admin.component.ts b/src/app/admin/admin.component.ts index a2eebff..7c74acf 100644 --- a/src/app/admin/admin.component.ts +++ b/src/app/admin/admin.component.ts @@ -11,11 +11,11 @@ import {ActivatedRoute, Router} from "@angular/router"; }) export class AdminComponent extends BaseComponent implements OnInit { - constructor(private route: ActivatedRoute, + constructor(protected _route: ActivatedRoute, private stakeholderService: StakeholderService, protected _router: Router) { super() - this.initRouterParams(this.route); + this.initRouterParams(this._route); } diff --git a/src/app/admin/admin.module.ts b/src/app/admin/admin.module.ts index 38a4381..45a8612 100644 --- a/src/app/admin/admin.module.ts +++ b/src/app/admin/admin.module.ts @@ -9,7 +9,8 @@ import {AdminComponent} from "./admin.component"; {path: '', loadChildren: () => import('../openaireLibrary/monitor-admin/manageStakeholders/manageStakeholders.module').then(m => m.ManageStakeholdersModule)}, {path: ':alias', children: [ {path: '', loadChildren: () => import('../openaireLibrary/monitor-admin/general/general.module').then(m => m.GeneralModule)} - ]} + ] + } ]} ])], declarations: [AdminComponent], diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 69c804c..fb9153b 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -28,7 +28,7 @@ const routes: Routes = [ { path: 'admin', loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule), - data: {title: Irish.METADATA_PREFIX + ' Admin | '} + data: {title: Irish.METADATA_PREFIX + ' Admin | '}, }, ]; diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 496af68..61cbd63 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,15 +1,14 @@ import {Component, OnInit} from '@angular/core'; -import {properties} from "../environments/environment"; import {ActivatedRoute, Router} from "@angular/router"; import {MenuItem} from "./openaireLibrary/sharedComponents/menu"; import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component"; import {BaseComponent} from "./openaireLibrary/sharedComponents/base/base.component"; -import {StakeholderEntities, stakeholderTypes} from "./openaireLibrary/monitor/entities/stakeholder"; -import {Option} from "./openaireLibrary/sharedComponents/input/input.component"; +import {StakeholderEntities} from "./openaireLibrary/monitor/entities/stakeholder"; import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service"; -import {Portal} from "./openaireLibrary/utils/entities/adminTool/portal"; import {Irish} from "./shared/irish"; import {CustomFilterService} from "./shared/customFilter.service"; +import {UserManagementService} from "./openaireLibrary/services/user-management.service"; +import {User} from "./openaireLibrary/login/utils/helper.class"; @Component({ selector: 'app-root', @@ -20,8 +19,8 @@ import {CustomFilterService} from "./shared/customFilter.service";
- -
+ +