[DURACOM-191] change routing for forgot-password, delete forgot-password.module.ts

This commit is contained in:
Andrea Barbasso
2024-01-10 10:51:00 +01:00
parent d73fc0f073
commit 1145c01ba9
5 changed files with 28 additions and 65 deletions

View File

@@ -92,8 +92,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
}, },
{ {
path: FORGOT_PASSWORD_PATH, path: FORGOT_PASSWORD_PATH,
loadChildren: () => import('./forgot-password/forgot-password.module') loadChildren: () => import('./forgot-password/forgot-password-routes')
.then((m) => m.ForgotPasswordModule), .then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard] canActivate: [EndUserAgreementCurrentUserGuard]
}, },
{ {

View File

@@ -16,11 +16,11 @@ export const CAPTCHA_NAME = 'google-recaptcha';
/** /**
* A GoogleRecaptchaService used to send action and get a token from REST * A GoogleRecaptchaService used to send action and get a token from REST
*/ */
@Injectable() @Injectable({providedIn: 'root'})
export class GoogleRecaptchaService { export class GoogleRecaptchaService {
private renderer: Renderer2; private renderer: Renderer2;
x
/** /**
* A Google Recaptcha version * A Google Recaptcha version
*/ */

View File

@@ -0,0 +1,24 @@
import { ItemPageResolver } from '../item-page/item-page.resolver';
import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed-forgot-password-form.component';
import { ThemedForgotEmailComponent } from './forgot-password-email/themed-forgot-email.component';
import { RegistrationGuard } from '../register-page/registration.guard';
import { Route } from '@angular/router';
export const ROUTES: Route[] = [
{
path: '',
component: ThemedForgotEmailComponent,
data: {title: 'forgot-password.title'},
providers: [
ItemPageResolver,
]
},
{
path: ':token',
component: ThemedForgotPasswordFormComponent,
canActivate: [RegistrationGuard],
providers: [
ItemPageResolver,
]
}
];

View File

@@ -1,31 +0,0 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { ItemPageResolver } from '../item-page/item-page.resolver';
import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed-forgot-password-form.component';
import { ThemedForgotEmailComponent } from './forgot-password-email/themed-forgot-email.component';
import { RegistrationGuard } from '../register-page/registration.guard';
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: ThemedForgotEmailComponent,
data: {title: 'forgot-password.title'},
},
{
path: ':token',
component: ThemedForgotPasswordFormComponent,
canActivate: [ RegistrationGuard ],
}
])
],
providers: [
ItemPageResolver,
]
})
/**
* This module defines the routing to the components related to the forgot password components.
*/
export class ForgotPasswordRoutingModule {
}

View File

@@ -1,30 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ForgotEmailComponent } from './forgot-password-email/forgot-email.component';
import { ForgotPasswordRoutingModule } from './forgot-password-routing.module';
import { RegisterEmailFormModule } from '../register-email-form/register-email-form.module';
import { ForgotPasswordFormComponent } from './forgot-password-form/forgot-password-form.component';
import { ProfilePageModule } from '../profile-page/profile-page.module';
import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed-forgot-password-form.component';
import { ThemedForgotEmailComponent } from './forgot-password-email/themed-forgot-email.component';
@NgModule({
imports: [
CommonModule,
ForgotPasswordRoutingModule,
RegisterEmailFormModule,
ProfilePageModule,
ForgotEmailComponent,
ThemedForgotEmailComponent,
ForgotPasswordFormComponent,
ThemedForgotPasswordFormComponent
],
providers: []
})
/**
* Module related to the Forgot Password components
*/
export class ForgotPasswordModule {
}