[DURACOM-191] change routing for profile-page

This commit is contained in:
Andrea Barbasso
2024-01-10 17:05:33 +01:00
parent ca09cfb07b
commit 7f3739f7ed
6 changed files with 15 additions and 60 deletions

View File

@@ -192,8 +192,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
},
{
path: PROFILE_MODULE_PATH,
loadChildren: () => import('./profile-page/profile-page.module')
.then((m) => m.ProfilePageModule),
loadChildren: () => import('./profile-page/profile-page-routes')
.then((m) => m.ROUTES),
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard]
},
{

View File

@@ -0,0 +1,13 @@
import { Route } from '@angular/router';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
import { ThemedProfilePageComponent } from './themed-profile-page.component';
export const ROUTES: Route[] = [
{
path: '',
pathMatch: 'full',
component: ThemedProfilePageComponent,
resolve: {breadcrumb: I18nBreadcrumbResolver},
data: {breadcrumbKey: 'profile', title: 'profile.title'}
}
];

View File

@@ -1,15 +0,0 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
import { ThemedProfilePageComponent } from './themed-profile-page.component';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', pathMatch: 'full', component: ThemedProfilePageComponent, resolve: { breadcrumb: I18nBreadcrumbResolver }, data: { breadcrumbKey: 'profile', title: 'profile.title' } }
])
]
})
export class ProfilePageRoutingModule {
}

View File

@@ -1,39 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ProfilePageRoutingModule } from './profile-page-routing.module';
import { ProfilePageComponent } from './profile-page.component';
import { ProfilePageMetadataFormComponent } from './profile-page-metadata-form/profile-page-metadata-form.component';
import { ProfilePageSecurityFormComponent } from './profile-page-security-form/profile-page-security-form.component';
import {
ProfilePageResearcherFormComponent
} from './profile-page-researcher-form/profile-page-researcher-form.component';
import { ThemedProfilePageComponent } from './themed-profile-page.component';
import { FormModule } from '../shared/form/form.module';
import { UiSwitchModule } from 'ngx-ui-switch';
import { ProfileClaimItemModalComponent } from './profile-claim-item-modal/profile-claim-item-modal.component';
@NgModule({
imports: [
ProfilePageRoutingModule,
CommonModule,
FormModule,
UiSwitchModule,
ProfilePageComponent,
ThemedProfilePageComponent,
ProfileClaimItemModalComponent,
ProfilePageMetadataFormComponent,
ProfilePageSecurityFormComponent,
ProfilePageResearcherFormComponent
],
exports: [
ProfilePageComponent,
ThemedProfilePageComponent,
ProfilePageMetadataFormComponent,
ProfilePageSecurityFormComponent,
ProfilePageResearcherFormComponent
]
})
export class ProfilePageModule {
}

View File

@@ -10,7 +10,6 @@ import { IdlePreloadModule } from 'angular-idle-preload';
import { MenuModule } from '../../app/shared/menu/menu.module';
import { NavbarModule } from '../../app/navbar/navbar.module';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ProfilePageModule } from '../../app/profile-page/profile-page.module';
import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module';
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
import { SearchPageModule } from '../../app/search-page/search-page.module';
@@ -281,7 +280,6 @@ const DECLARATIONS = [
DsoPageModule,
NavbarModule,
NgbModule,
ProfilePageModule,
RegisterEmailFormModule,
RouterModule,
ScrollToModule,

View File

@@ -10,7 +10,6 @@ import { IdlePreloadModule } from 'angular-idle-preload';
import { MenuModule } from '../../app/shared/menu/menu.module';
import { NavbarModule } from '../../app/navbar/navbar.module';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ProfilePageModule } from '../../app/profile-page/profile-page.module';
import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module';
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
import { SearchPageModule } from '../../app/search-page/search-page.module';
@@ -61,7 +60,6 @@ const DECLARATIONS = [
MenuModule,
NavbarModule,
NgbModule,
ProfilePageModule,
RegisterEmailFormModule,
RouterModule,
ScrollToModule,