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AAA;QAI6DA,uDAAAA;QAAAA,wDAAAA;;;;;;EDPrG,OAAaC,cAAb;AAAA;;;;;;;;;;;;;;;;;;;;AEdA;AACA;AACA;AACA;;;AAEO,MAAMuD,MAAM,GAAW,CAC5B;EAAEC,IAAI,EAAE,EAAR;EAAYC,SAAS,EAAEzD,4DAAvB;EAAuC0D,SAAS,EAAE;AAAlD,CAD4B,CAAvB;AAYA,IAAMC,WAAb;EAAM,MAAOA,WAAP,CAAkB;;;qBAAXA;EAAW;;;UAAXA;;;cALTP,yDAAYA,EACZC,kEAAA,CAAsBE,MAAtB,GACAD,+DAAYA;;EAGhB,OAAaK,WAAb;AAAA;;;sHAAaA,aAAW;IAAAE,eAPP7D,4DAOO;IAPO8D,UAE3BV,yDAF2B,EAEfW,yDAFe,EAI3BT,+DAJ2B;EAOP;AAHR","sources":["./src/app/pages/reset/reset.component.ts","./src/app/pages/reset/reset.component.html","./src/app/pages/reset/reset.module.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { AppSettings, Settings } from 'src/app/app.settings';\nimport { EncryptDecrypt } from '../../theme//directives/encrypt_decrypt';\nimport { AuthService } from '../../auth.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { AppService } from 'src/app/app.service';\nimport { matchingPasswords, emailValidator } from 'src/app/theme/utils/app-validators';\n@Component({\n selector: 'app-reset',\n templateUrl: './reset.component.html',\n styleUrls: ['./reset.component.scss']\n})\nexport class ResetComponent implements OnInit {\n public resetForm!: UntypedFormGroup;\n public hide = true;\n public bgImage: any;\n public settings: Settings;\n public returnUrl: string;\n public loading = false;\n constructor(public fb: UntypedFormBuilder,\n public router: Router,\n private route: ActivatedRoute,\n private sanitizer: DomSanitizer,\n public appSettings: AppSettings,\n private authService: AuthService,\n private encrypt: EncryptDecrypt,\n public appService: AppService,\n public snackBar: MatSnackBar) {\n this.settings = this.appSettings.settings;\n //this.authService.logout();\n this.appService.loggedin = false;\n\n // get return url from route parameters or default to '/'\n this.returnUrl = this.route.snapshot.queryParams.returnUrl || '/';\n }\n\n ngOnInit(): void {\n this.bgImage = this.sanitizer.bypassSecurityTrustStyle('url(assets/images/others/login.jpg)');\n this.resetForm = this.fb.group({\n email: ['', Validators.compose([Validators.required, emailValidator])],\n\n });\n }\n\n public onResetFormSubmit(): void {\n if (this.resetForm.valid) {\n this.loading = true;\n const req = {\n Email: this.resetForm.value.email\n }\n\n this.appService.ResetPasswordLink(req)\n .subscribe({\n next: (data) => {\n console.log(data);\n \n\n if (data === \"\") {\n this.loading = false;\n this.snackBar.open('Password reset link sent to your registered email.', '×', { panelClass: 'success', verticalPosition: 'top', duration: 6000 });\n this.router.navigate(['login']);\n } else {\n\n this.loading = false;\n if (data != null)\n this.snackBar.open(data.toString(), '×', { panelClass: 'error', verticalPosition: 'top', duration: 4000 });\n }\n\n },\n error: (e) => {\n this.loading = false;\n this.snackBar.open(e.error, 'X', { panelClass: 'error', verticalPosition: 'top', duration: 4000 });\n },\n complete: () => {\n this.loading = false;\n }\n })\n \n }\n }\n public backtologin(): void {\n this.router.navigate(['login']);\n }\n\n}\n","<div class=\"px-3 py-5\">\n <div class=\"theme-container\"> \n <mat-card class=\"p-0 o-hidden\">\n <div fxLayout=\"row wrap\"> \n <div fxFlex=\"100\" fxFlex.gt-sm=\"50\" class=\"p-0\" [style.background-image]=\"bgImage\" class=\"bg-cover\"> \n </div> \n <div fxFlex=\"100\" fxFlex.gt-sm=\"50\" class=\"py-3\" ngClass.gt-sm=\"px-5\" ngClass.sm=\"px-3\" ngClass.xs=\"px-3\"> \n \n <h1 class=\"secondary-font\">Reset your password</h1> \n <div>\n Enter your email address and we will send you a link to reset your password.</div> \n \n <form [formGroup]=\"resetForm\" (ngSubmit)=\"onResetFormSubmit()\">\n <mat-form-field appearance=\"outline\" class=\"w-100 mt-2\">\n <mat-icon matPrefix class=\"mr-1 text-muted\">email</mat-icon>\n <mat-label>Registered Email</mat-label>\n <input matInput placeholder=\"Registered Email\" formControlName=\"email\" required>\n <mat-error *ngIf=\"resetForm.controls.email.errors?.required\">Email is required</mat-error>\n <mat-error *ngIf=\"resetForm.controls.email.hasError('invalidEmail')\">Invalid email address</mat-error>\n </mat-form-field>\n\n <div class=\"text-center mt-2\"> \n <button mat-raised-button color=\"accent\" class=\"uppercase\" type=\"submit\" [disabled]=\"loading\" >\n Send reset Link\n </button>\n </div> \n \n </form>\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button mat-button (click)=\"backtologin()\">\n <mat-icon class=\"text-muted\">keyboard_backspace</mat-icon>\n <span class=\"mx-1\">Back to login page</span>\n </button> \n </div> \n </div> \n </div> \n </mat-card> \n </div>\n</div> ","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { SharedModule } from '../../shared/shared.module';\r\nimport { ResetComponent } from './reset.component';\r\n\r\nexport const routes: Routes = [\r\n { path: '', component: ResetComponent, pathMatch: 'full' }\r\n];\r\n\r\n@NgModule({\r\n declarations: [ResetComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule.forChild(routes),\r\n SharedModule\r\n ]\r\n})\r\nexport class ResetModule { }\r\n"],"names":["Validators","emailValidator","i0","ResetComponent","constructor","fb","router","route","sanitizer","appSettings","authService","encrypt","appService","snackBar","settings","loggedin","returnUrl","snapshot","queryParams","ngOnInit","bgImage","bypassSecurityTrustStyle","resetForm","group","email","compose","required","onResetFormSubmit","valid","loading","req","Email","value","ResetPasswordLink","subscribe","next","data","console","log","open","panelClass","verticalPosition","duration","navigate","toString","error","e","complete","backtologin","selectors","decls","vars","consts","template","ctx","CommonModule","RouterModule","SharedModule","routes","path","component","pathMatch","ResetModule","forChild","declarations","imports","i1"],"sourceRoot":"webpack:///"}