From 5dcc9f903011150fcaeb71d3cff23707f7780dfc Mon Sep 17 00:00:00 2001 From: Aastha Bist Date: Thu, 19 Dec 2024 11:35:26 +0530 Subject: [PATCH 01/18] fix: Fixes a bug and contains minor css changes (#3358) --- .../auth/new-password/new-password.page.html | 12 +++- .../auth/new-password/new-password.page.scss | 2 +- .../auth/new-password/new-password.page.ts | 9 ++- .../reset-password/reset-password.page.html | 2 +- .../reset-password.page.spec.ts | 7 ++- .../reset-password/reset-password.page.ts | 2 +- .../auth/sign-in/error/error.component.scss | 2 +- src/app/auth/sign-in/sign-in.page.html | 16 ++--- src/app/auth/sign-in/sign-in.page.scss | 63 ++++++++----------- src/app/auth/sign-in/sign-in.page.spec.ts | 14 +---- src/app/auth/sign-in/sign-in.page.ts | 10 +-- .../invited-user/invited-user.page.scss | 2 +- src/global.scss | 4 ++ 13 files changed, 76 insertions(+), 69 deletions(-) diff --git a/src/app/auth/new-password/new-password.page.html b/src/app/auth/new-password/new-password.page.html index e4955fc821..b5798a0961 100644 --- a/src/app/auth/new-password/new-password.page.html +++ b/src/app/auth/new-password/new-password.page.html @@ -62,7 +62,7 @@ @@ -96,7 +96,15 @@
- + Reset password
diff --git a/src/app/auth/new-password/new-password.page.scss b/src/app/auth/new-password/new-password.page.scss index 4341395b5c..5df595b64e 100644 --- a/src/app/auth/new-password/new-password.page.scss +++ b/src/app/auth/new-password/new-password.page.scss @@ -88,7 +88,7 @@ } &__back-icon { - margin-bottom: 20px; + margin-bottom: 16px; width: 28px; height: 28px; } diff --git a/src/app/auth/new-password/new-password.page.ts b/src/app/auth/new-password/new-password.page.ts index 1032da3806..57530edce8 100644 --- a/src/app/auth/new-password/new-password.page.ts +++ b/src/app/auth/new-password/new-password.page.ts @@ -39,6 +39,8 @@ export class NewPasswordPage implements OnInit { showPasswordTooltip = false; + isLoading = false; + constructor( private fb: FormBuilder, private activatedRoute: ActivatedRoute, @@ -62,7 +64,7 @@ export class NewPasswordPage implements OnInit { changePassword(): void { const refreshToken = this.activatedRoute.snapshot.params.refreshToken as string; - + this.isLoading = true; from(this.loaderService.showLoader()) .pipe( switchMap(() => this.routerAuthService.resetPassword(refreshToken, this.fg.controls.password.value as string)), @@ -73,7 +75,10 @@ export class NewPasswordPage implements OnInit { this.trackingService.resetPassword(); await this.trackLoginInfo(); }), - finalize(() => from(this.loaderService.hideLoader())) + finalize(() => { + this.isLoading = false; + return from(this.loaderService.hideLoader()); + }) ) .subscribe( () => { diff --git a/src/app/auth/reset-password/reset-password.page.html b/src/app/auth/reset-password/reset-password.page.html index 2a3722c334..fb032a0b3e 100644 --- a/src/app/auth/reset-password/reset-password.page.html +++ b/src/app/auth/reset-password/reset-password.page.html @@ -14,7 +14,7 @@
-
Registered Email
+
Registered email
{ it('onGotoSignInClick(): should navigate to sign-in page', () => { component.onGotoSignInClick(); - expect(router.navigate).toHaveBeenCalledWith(['/', 'auth', 'sign_in']); + expect(router.navigate).toHaveBeenCalledWith([ + '/', + 'auth', + 'sign_in', + { email: component.fg.controls.email.value }, + ]); }); }); diff --git a/src/app/auth/reset-password/reset-password.page.ts b/src/app/auth/reset-password/reset-password.page.ts index 17f7740976..e9bac076e7 100644 --- a/src/app/auth/reset-password/reset-password.page.ts +++ b/src/app/auth/reset-password/reset-password.page.ts @@ -91,6 +91,6 @@ export class ResetPasswordPage { } onGotoSignInClick(): void { - this.router.navigate(['/', 'auth', 'sign_in']); + this.router.navigate(['/', 'auth', 'sign_in', { email: this.fg.controls.email.value as string }]); } } diff --git a/src/app/auth/sign-in/error/error.component.scss b/src/app/auth/sign-in/error/error.component.scss index 7b01cf25fb..496b825bc9 100644 --- a/src/app/auth/sign-in/error/error.component.scss +++ b/src/app/auth/sign-in/error/error.component.scss @@ -28,7 +28,7 @@ } &__details { - font-size: 16px; + font-size: 14px; padding: 20px 16px; color: $black; } diff --git a/src/app/auth/sign-in/sign-in.page.html b/src/app/auth/sign-in/sign-in.page.html index d453b91a88..0fbb779586 100644 --- a/src/app/auth/sign-in/sign-in.page.html +++ b/src/app/auth/sign-in/sign-in.page.html @@ -38,14 +38,14 @@