From ed857c5ca45086ac30a4f1977ac5ae524b15161a Mon Sep 17 00:00:00 2001
From: Marlene Simondant <msimondant@grandlyon.com>
Date: Tue, 15 Feb 2022 13:38:38 +0100
Subject: [PATCH] feat(reset-password): add notification when reset email is
 sent

---
 src/app/reset-password/reset-password.component.ts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/app/reset-password/reset-password.component.ts b/src/app/reset-password/reset-password.component.ts
index 627cff9ba..4744261e9 100644
--- a/src/app/reset-password/reset-password.component.ts
+++ b/src/app/reset-password/reset-password.component.ts
@@ -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(['']);
       },
       () => {
-- 
GitLab