2023-11-02 15:39:57 +01:00
|
|
|
import {NgModule} from "@angular/core";
|
|
|
|
import {CommonModule} from "@angular/common";
|
|
|
|
import {RouterModule} from "@angular/router";
|
|
|
|
import {AdminComponent} from "./admin.component";
|
2023-11-13 14:00:45 +01:00
|
|
|
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
|
|
|
|
import {SideBarModule} from "../openaireLibrary/dashboard/sharedComponents/sidebar/sideBar.module";
|
2023-11-14 15:13:09 +01:00
|
|
|
import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module";
|
2023-11-16 13:38:27 +01:00
|
|
|
import {LogoUrlPipeModule} from "../openaireLibrary/utils/pipes/logoUrlPipe.module";
|
2024-01-09 11:02:07 +01:00
|
|
|
import {AdminLoginGuard} from "../openaireLibrary/login/adminLoginGuard.guard";
|
2024-01-10 13:22:21 +01:00
|
|
|
import {LoginGuard} from "../openaireLibrary/login/loginGuard.guard";
|
|
|
|
import {AdminDashboardGuard} from "../openaireLibrary/monitor-admin/utils/adminDashboard.guard";
|
2023-11-02 15:39:57 +01:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [CommonModule, RouterModule.forChild([
|
2023-11-13 14:00:45 +01:00
|
|
|
{
|
|
|
|
path: '', component: AdminComponent, children: [
|
|
|
|
{
|
|
|
|
path: '',
|
2024-01-10 13:22:21 +01:00
|
|
|
canActivateChild: [LoginGuard],
|
2024-01-09 13:16:35 +01:00
|
|
|
loadChildren: () => import('../openaireLibrary/monitor-admin/manageStakeholders/manageStakeholders.module').then(m => m.ManageStakeholdersModule),
|
|
|
|
data: {hasAdminMenu: true, hasSidebar: false}
|
2023-11-13 14:00:45 +01:00
|
|
|
},
|
|
|
|
{
|
2024-01-09 11:02:07 +01:00
|
|
|
path: 'admin-tools',
|
|
|
|
loadChildren: () => import('../admin-tools/portal-admin-tools-routing.module').then(m => m.PortalAdminToolsRoutingModule),
|
|
|
|
canActivateChild: [AdminLoginGuard],
|
|
|
|
data: {hasAdminMenu: true, hasSidebar: false}
|
|
|
|
},
|
|
|
|
{
|
2024-01-10 13:22:21 +01:00
|
|
|
path: ':stakeholder',
|
|
|
|
canActivateChild: [AdminDashboardGuard],
|
|
|
|
children: [
|
2023-11-13 14:00:45 +01:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
loadChildren: () => import('../openaireLibrary/monitor-admin/general/general.module').then(m => m.GeneralModule)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
matcher: HelperFunctions.routingMatcher(['indicators', 'indicators/:topic']),
|
|
|
|
loadChildren: () => import('../openaireLibrary/monitor-admin/topic/topic.module').then(m => m.TopicModule),
|
2023-11-16 13:38:27 +01:00
|
|
|
data: {hasInternalSidebar: true, showLogo: true},
|
2023-11-13 14:00:45 +01:00
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
2023-11-30 13:22:04 +01:00
|
|
|
{
|
|
|
|
path: 'users',
|
|
|
|
redirectTo: 'users/manager',
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'users/manager',
|
|
|
|
loadChildren: () => import('./users/users.module').then(m => m.UsersModule),
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
2024-01-09 11:02:07 +01:00
|
|
|
{
|
|
|
|
path: 'admin-tools',
|
|
|
|
loadChildren: () => import('../admin-tools/admin-tools-routing.module').then(m => m.AdminToolsRoutingModule),
|
|
|
|
data: {param: 'stakeholder', parentClass: 'monitor'}
|
|
|
|
}
|
2023-11-09 13:34:34 +01:00
|
|
|
]
|
|
|
|
}
|
2023-11-13 14:00:45 +01:00
|
|
|
]
|
|
|
|
}
|
2023-11-16 13:38:27 +01:00
|
|
|
]), SideBarModule, LoadingModule, LogoUrlPipeModule],
|
2023-11-02 15:39:57 +01:00
|
|
|
declarations: [AdminComponent],
|
|
|
|
exports: [AdminComponent]
|
|
|
|
})
|
|
|
|
export class AdminModule {
|
|
|
|
|
|
|
|
}
|