diff --git a/.vscode/settings.json b/.vscode/settings.json index bf5ee55..39e29c9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,5 +11,5 @@ }, "editor.formatOnSave": false }, - "conventionalCommits.scopes": ["Backoffice", "Web", "CV", "GenericTable"] + "conventionalCommits.scopes": ["Backoffice", "Web", "CV", "GenericTable", "Auth"] } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index fbe810f..6d8af6d 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,36 +1,37 @@ import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; -import { FormularioRecuperacionComponent } from './backoffice/autentificacion/formulario-recuperacion/formulario-recuperacion.component'; -import { LoginSuccessComponent } from './backoffice/autentificacion/login-success/login-success.component'; -import { LoginComponent } from './backoffice/autentificacion/login/login.component'; -import { RecuperarPasswordComponent } from './backoffice/autentificacion/recuperar-password/recuperar-password.component'; +import { + FormResetPasswordComponent, + formResetPasswordTitleResolver, +} from './backoffice/autentificacion/form-reset-password/form-reset-password.component'; +import { LoginComponent, loginTitleResolver } from './backoffice/autentificacion/login/login.component'; +import { + ResetPasswordComponent, + resetPasswordTitleResolver, +} from './backoffice/autentificacion/reset-password/reset-password.component'; import { AuthGuard } from './shared/guards/auth.guard'; const routes: Routes = [ { path: '', canActivate: [], - loadChildren: () => - import('./website/website.module').then((m) => m.WebsiteModule), + loadChildren: () => import('./website/website.module').then((m) => m.WebsiteModule), }, { path: 'backoffice', - loadChildren: () => - import('./backoffice/layout/backoffice/backoffice.module').then( - (m) => m.BackofficeModule, - ), + loadChildren: () => import('./backoffice/layout/backoffice/backoffice.module').then((m) => m.BackofficeModule), canActivate: [AuthGuard], }, - { path: 'login', component: LoginComponent }, - { path: 'login-success', component: LoginSuccessComponent }, - { path: 'reset-password', component: RecuperarPasswordComponent }, + { path: 'login', component: LoginComponent, title: loginTitleResolver }, + { path: 'reset-password', component: ResetPasswordComponent, title: resetPasswordTitleResolver }, { path: 'form-reset-password', - component: FormularioRecuperacionComponent, + component: FormResetPasswordComponent, + title: formResetPasswordTitleResolver, }, { path: 'form-reset-password/:access_token/', - component: FormularioRecuperacionComponent, + component: FormResetPasswordComponent, }, { path: '**', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index acfbcbd..f8ca0e0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -16,10 +16,9 @@ import { InputTextModule } from 'primeng/inputtext'; import { ToastModule } from 'primeng/toast'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; -import { FormularioRecuperacionComponent } from './backoffice/autentificacion/formulario-recuperacion/formulario-recuperacion.component'; -import { LoginSuccessComponent } from './backoffice/autentificacion/login-success/login-success.component'; +import { FormResetPasswordComponent } from './backoffice/autentificacion/form-reset-password/form-reset-password.component'; import { LoginComponent } from './backoffice/autentificacion/login/login.component'; -import { RecuperarPasswordComponent } from './backoffice/autentificacion/recuperar-password/recuperar-password.component'; +import { ResetPasswordComponent } from './backoffice/autentificacion/reset-password/reset-password.component'; import { BackofficeModule } from './backoffice/layout/backoffice/backoffice.module'; import { LanguageSelectModule } from './shared/components/language-select/language-select.module'; import { LanguagesModule } from './shared/modules/languages.module'; @@ -30,13 +29,7 @@ export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http, './assets/i18n/'); } @NgModule({ - declarations: [ - AppComponent, - LoginComponent, - LoginSuccessComponent, - FormularioRecuperacionComponent, - RecuperarPasswordComponent, - ], + declarations: [AppComponent, LoginComponent, FormResetPasswordComponent, ResetPasswordComponent], providers: [MessageService, ConfirmationService, PrimeNGConfig], bootstrap: [AppComponent], imports: [ diff --git a/src/app/backoffice/autentificacion/form-reset-password/form-reset-password.component.html b/src/app/backoffice/autentificacion/form-reset-password/form-reset-password.component.html new file mode 100644 index 0000000..5b3de67 --- /dev/null +++ b/src/app/backoffice/autentificacion/form-reset-password/form-reset-password.component.html @@ -0,0 +1,52 @@ +