Forgotpassword flow changes : ps

This commit is contained in:
VE10-Sanjeev 2022-08-12 21:58:30 +05:30
parent 597e07b0f6
commit 528b1dbb80
2 changed files with 16 additions and 15 deletions

View File

@ -135,20 +135,20 @@ export class LoginComponent implements OnInit{
* Defalut aws function
* @param email password,newpassword
*/
newpassopen() {
let dialogRef = this.dialog.open(NewPasswordDialog, this.config);
dialogRef.afterClosed().subscribe(result => {
if (result !== undefined) {
let auth = { 'Username': this.email.split(/\s/).join(''), 'Password': this.password, 'newpassword': result };
this.aws.dologin(auth).subscribe(res => {
this.getCommonSettings();
this.router.navigate(['/']);
}, err => {
// alert(err.message);
})
}
});
}
// newpassopen() {
// let dialogRef = this.dialog.open(NewPasswordDialog, this.config);
// dialogRef.afterClosed().subscribe(result => {
// if (result !== undefined) {
// let auth = { 'Username': this.email.split(/\s/).join(''), 'Password': this.password, 'newpassword': result };
// this.aws.dologin(auth).subscribe(res => {
// this.getCommonSettings();
// this.router.navigate(['/']);
// }, err => {
// // alert(err.message);
// })
// }
// });
// }
forgotopen() {
this.status = true;

View File

@ -21,7 +21,8 @@ import { RouterModule } from '@angular/router';
import { UserRoutes} from './users.routing';
import { UserProfileComponent, ChangePasswordDialog } from './user-profile/user-profile.component';
import { UserService } from './../service/user.service';
import { NewPasswordDialog, ForgotPass } from '../../session/login/login.component';
// import { NewPasswordDialog, ForgotPass } from '../../session/login/login.component';
import { NewPasswordDialog, ForgotPass } from '../../session/otp/otp.component';
// import { HttpClientModule } from '@angular/common/http';
@NgModule({
imports: [