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KAAK,CAAC,yBAAyB,CAAC;;IAEhD,CAAC,EACDA,KAAK,IAAG;MACN,IAAI,CAACM,OAAO,GAAG,KAAK;MACpBC,OAAO,CAACP,KAAK,CAACA,KAAK,CAAC;MACpB,IAAI,CAACjB,MAAM,CAACiB,KAAK,CAAC,uBAAuB,CAAC;IAC5C,CAAC,EACD,MAAK;MACHQ,UAAU,CAAC,MAAK;QACd,IAAI,CAACF,OAAO,GAAG,KAAK;MACtB,CAAC,EAAE,IAAI,CAAC;IACV,CAAC,CACF;EACH;EAEAD,YAAY,CAACF,IAAS;IACpB,IAAIA,IAAI,EAAE;MACR,IAAI,CAACnB,MAAM,CAACyB,aAAa,CAAC,uBAAuB,CAAC;;EAEtD;EAAC;qBAtDUjD,uBAAuB;EAAA;EAAA;UAAvBA,uBAAuB;IAAAkD;IAAAC;IAAAC;IAAAC;IAAAC;MAAA;QDZpClC,4DAAAA,aACiG;QAIhEA,uDAAAA,aAAiE;QAAAA,0DAAAA,EAAO;QACzFA,4DAAAA,YAA+B;QAAAA,oDAAAA,uBAAgB;QAAAA,0DAAAA,EAAK;QAGxDA,4DAAAA,aAAiB;QAKGA,uDAAAA,iBAAqF;QACzFA,0DAAAA,EAAM;QAEVA,4DAAAA,eAAoC;QAE2BA,wDAAAA;UAAA,OAASmC,cAAU;QAAA,EAAC;QAACnC,oDAAAA,cAAM;QAAAA,0DAAAA,EAAI;QAIlGA,wDAAAA,gEAWO;QACPA,wDAAAA,iEAgBO;QACXA,0DAAAA,EAAM;;;QAzCIA,uDAAAA,IAA4B;QAA5BA,wDAAAA,iCAA4B;QAYmBA,uDAAAA,GAAW;QAAXA,wDAAAA,eAAW;QAYXA,uDAAAA,GAAW;QAAXA,wDAAAA,eAAW","sources":["./src/app/core/authentication/authentication-routing.module.ts","./src/app/core/authentication/authentication.module.ts","./src/app/core/authentication/change-password/change-password.component.ts","./src/app/core/authentication/change-password/change-password.component.html","./src/app/core/authentication/forget-password/forget-password.component.html","./src/app/core/authentication/forget-password/forget-password.component.ts"],"sourcesContent":["import { ChangeDetectorRef, NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { ChangePasswordComponent } from './change-password/change-password.component';\r\nimport { ForgetPasswordComponent } from './forget-password/forget-password.component';\r\nimport { LoginComponent } from './login/login.component';\r\nimport { PageNotFoundComponent } from './page-not-found/page-not-found.component';\r\nimport { SignupComponent } from './signup/signup.component';\r\n\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n children: [\r\n {\r\n path: 'page-not-found',\r\n component: PageNotFoundComponent\r\n },\r\n {\r\n path: 'login',\r\n component: LoginComponent\r\n },\r\n {\r\n path: 'login/:accesskey',\r\n component: LoginComponent\r\n },\r\n {\r\n path: 'signup',\r\n component: SignupComponent\r\n },\r\n {\r\n path: 'forget-password',\r\n component:ForgetPasswordComponent\r\n },\r\n {\r\n path: 'change-password',\r\n component:ChangePasswordComponent\r\n },\r\n ]\r\n }\r\n \r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuthenticationRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AuthenticationRoutingModule } from './authentication-routing.module';\r\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\r\nimport { LoginComponent } from './login/login.component';\r\nimport { SignupComponent } from './signup/signup.component';\r\nimport { PageNotFoundComponent } from './page-not-found/page-not-found.component';\r\nimport { ForgetPasswordComponent } from './forget-password/forget-password.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { ChangePasswordComponent } from './change-password/change-password.component';\r\nimport { SharedModule } from '../shared/shared.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n LoginComponent,\r\n SignupComponent,\r\n PageNotFoundComponent,\r\n ForgetPasswordComponent,\r\n ChangePasswordComponent,],\r\n imports: [\r\n CommonModule,\r\n AuthenticationRoutingModule,\r\n NgbModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SharedModule\r\n ]\r\n})\r\nexport class AuthenticationModule { }\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { Router } from '@angular/router';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { AccountServices } from '../../services/account.service';\r\n\r\n@Component({\r\n selector: 'app-change-password',\r\n templateUrl: './change-password.component.html',\r\n styleUrls: ['./change-password.component.css']\r\n})\r\nexport class ChangePasswordComponent implements OnInit {\r\n changePasswordForm!: UntypedFormGroup;\r\n submitted = false;\r\n loading=false;\r\n Password:any\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private toastr: ToastrService,\r\n private router:Router,\r\n private _changePasswordServices:AccountServices\r\n\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.changePasswordForm = this.formBuilder.group({\r\n email: ['', Validators.required],\r\n oldPassword: ['', Validators.required],\r\n newPassword: [null, Validators.required]\r\n });\r\n }\r\n\r\n get f() { return this.changePasswordForm.controls; }\r\n\r\n onSubmit() {\r\n this.submitted = true;\r\n if (this.changePasswordForm.invalid) {\r\n return;\r\n }\r\n var changePassword = {\r\n email: this.changePasswordForm.value.email,\r\n oldPassword: this.changePasswordForm.value.oldPassword,\r\n newPassword: this.changePasswordForm.value.newPassword,\r\n\r\n }\r\n if(changePassword.newPassword===changePassword.oldPassword){\r\n this.toastr.error('New and Old password cannot be same!!');\r\n return;\r\n }\r\n this._changePasswordServices.postChangePassword(changePassword).subscribe(\r\n (data: any) => {\r\n if (data) {\r\n this.toastr.success('Password Change Successfully', 'Success');\r\n this.redirectUser(data);\r\n }\r\n else {\r\n this.loading = false;\r\n this.toastr.error('Some Fields are missing');\r\n }\r\n },\r\n error => {\r\n this.loading = false;\r\n console.error(error);\r\n this.toastr.error('Something went wrong!');\r\n },\r\n () => {\r\n setTimeout(() => {\r\n this.loading = false;\r\n }, 5000);\r\n }\r\n )\r\n }\r\n\r\n redirectUser(data: any) {\r\n if (data) {\r\n this.router.navigateByUrl('/authentication/login');\r\n }\r\n else {\r\n this.toastr.error('Invalid user-name or password');\r\n }\r\n }\r\n}\r\n","