From 7e4066d05503ce328e628bf0364306630519ccfe Mon Sep 17 00:00:00 2001 From: Abhishek Tiwari <68281476+abhi9720@users.noreply.github.com> Date: Sun, 30 Jun 2024 14:06:49 +0530 Subject: [PATCH] resolves abhi9720/BankingPortal-API#13 Add methods to reset pin and password (#10) * implement ui for forget password * added validations for password * account password reset implemented and validation added to form for password --- src/app/app-routing.module.ts | 2 + src/app/app.module.ts | 2 + src/app/components/login/login.component.html | 13 +- src/app/components/otp/otp.component.ts | 22 ++- .../register/register.component.html | 35 +++-- .../components/register/register.component.ts | 23 +-- .../reset-password.component.css | 11 ++ .../reset-password.component.html | 90 ++++++++++++ .../reset-password.component.spec.ts | 23 +++ .../reset-password.component.ts | 138 ++++++++++++++++++ src/app/services/auth.service.ts | 18 ++- src/app/util/formutil.ts | 24 +++ 12 files changed, 360 insertions(+), 41 deletions(-) create mode 100644 src/app/components/reset-password/reset-password.component.css create mode 100644 src/app/components/reset-password/reset-password.component.html create mode 100644 src/app/components/reset-password/reset-password.component.spec.ts create mode 100644 src/app/components/reset-password/reset-password.component.ts create mode 100644 src/app/util/formutil.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 8fc756b..d5a207e 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -18,6 +18,7 @@ import { RegisterComponent } from './components/register/register.component'; import { OtpComponent } from './components/otp/otp.component'; import { NotfoundpageComponent } from './components/notfoundpage/notfoundpage.component'; import { ProfileComponent } from './components/profile/profile.component'; +import { ResetPasswordComponent } from './components/reset-password/reset-password.component'; const routes: Routes = [ { path: '', component: HomeComponent, pathMatch: 'full' }, // Root route (HomeComponent) without AuthGuard @@ -32,6 +33,7 @@ const routes: Routes = [ { path: 'login', component: LoginComponent }, { path: 'register', component: RegisterComponent }, { path: 'login/otp', component: OtpComponent }, + { path: 'forget-password', component: ResetPasswordComponent }, { path: '**', component: NotfoundpageComponent }, // Handle 404 - Page Not Found ]; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 26d2a78..c8e8d4b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -43,6 +43,7 @@ import { ApiService } from './services/api.service'; import { AuthService } from './services/auth.service'; import { LoadermodelService } from './services/loadermodel.service'; import { NgOtpInputModule } from 'ng-otp-input'; +import { ResetPasswordComponent } from './components/reset-password/reset-password.component'; @NgModule({ declarations: [ @@ -70,6 +71,7 @@ import { NgOtpInputModule } from 'ng-otp-input'; TransactionComponent, MonthlyTransactionChartComponent, DonwloadtransactionsComponent, + ResetPasswordComponent ], imports: [ RouterModule, diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index 9cb1d52..66a6011 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -31,9 +31,16 @@
Name: {{ registrationData.name }}
-Email: {{ registrationData.email }}
-Account Number: {{ registrationData.accountNumber }}
-Branch: {{ registrationData.branch }}
+Name: {{ registrationData.name || '-' }}
+Email: {{ registrationData.email }}
+Account Number: :{{ registrationData.accountNumber }}
+Branch: {{ registrationData.branch }}