Skip to content
Snippets Groups Projects
Commit ed857c5c authored by Marlène SIMONDANT's avatar Marlène SIMONDANT
Browse files

feat(reset-password): add notification when reset email is sent

parent 055e9cbe
No related branches found
No related tags found
2 merge requests!2201.14,!210feat/US57-reset-password-notification
......@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { AuthService } from '../services/auth.service';
import { NotificationService } from '../services/notification.service';
@Component({
selector: 'app-reset-password',
......@@ -21,7 +22,8 @@ export class ResetPasswordComponent implements OnInit {
private formBuilder: FormBuilder,
private authService: AuthService,
private router: Router,
private activatedRoute: ActivatedRoute
private activatedRoute: ActivatedRoute,
private notificationService: NotificationService
) {}
ngOnInit(): void {
......@@ -50,6 +52,10 @@ export class ResetPasswordComponent implements OnInit {
this.loading = true;
this.authService.resetPassword(this.f.email.value).subscribe(
() => {
this.notificationService.showSuccess(
'Un mail de confirmation de modification de votre mot de passe vous a été envoyé.',
''
);
this.router.navigate(['']);
},
() => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment