forget password changes

This commit is contained in:
bitbucket 2022-08-22 09:39:13 +05:30
parent 2bd51b504c
commit b6da192341
12 changed files with 1901 additions and 438 deletions

2250
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,7 @@
"cordova-plugin-x-socialsharing": "^5.6.8",
"cordova-sqlite-storage": "3.4.0",
"es6-promise-plugin": "^4.2.2",
"formidable": "^2.0.1",
"hammerjs": "^2.0.8",
"ionic-angular": "3.9.2",
"ionic-img-viewer": "^2.9.0",
@ -67,6 +68,7 @@
"ng2-pdf-viewer": "5.2.3",
"ngx-image-compress": "^8.0.4",
"ngx-mat-select-search": "^1.8.0",
"node-sass": "^7.0.1",
"rxjs": "^6.5.4",
"rxjs-compat": "^6.5.4",
"sw-toolbox": "3.6.0",
@ -114,4 +116,4 @@
"android"
]
}
}
}

View File

@ -14,7 +14,7 @@
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
<!-- cordova.js required for cordova apps (remove if not needed) -->
<script src="cordova.js"></script>

View File

@ -32,8 +32,14 @@
</mat-form-field>
<mat-form-field style="width: 100%" class="mb-1">
<input matInput placeholder="Password" minlength= "8" type="password" name="password" required [(ngModel)]="password">
<input matInput placeholder="Password" minlength= "8" [type]="hide ? 'password' : 'text'" name="password" required [(ngModel)]="password">
<ion-icon class="passwordIcon" name="{{hide ? 'eye-off' : 'eye'}}" matSuffix (click)="hide = !hide">{{hide ? 'eye-off' : 'eye'}}</ion-icon>
<!-- <ion-icon matSuffix name="eye-sharp"></ion-icon> -->
</mat-form-field>
<!-- <ion-icon name="save"></ion-icon> -->
<ion-row>
<ion-col text-center>
<button color="primary" mat-raised-button>SIGN IN</button><br/>

View File

@ -37,4 +37,7 @@ img{
line-height: 0px;
box-shadow: 0 16px 38px -12px rgba(0,0,0,.56), 0 4px 25px 0 rgba(0,0,0,.12), 0 8px 10px -5px rgba(0,0,0,.2) !important;
}
.passwordIcon{
color: #f34325 !important;
}
}

View File

@ -53,13 +53,14 @@ config: MatDialogConfig = {
userDetails: any;
commonDetails: any;
forgetpin: boolean = false;
hide: boolean;
constructor(private modalCtrl:ModalController,public aws: AwsServiceProvider, public navParams: NavParams,
public shared:CognitoServiceProvider,public navCtrl:NavController,public Menu:MenuController
,public toast:ToastProvider,public load:LoadingController,private events:Events,private constantProvider:ConstantsProvider,private pdtrigger:PdtriggerProvider,private salesPDProvider:SalesPdProvider) {
}
ngOnInit(){
this.hide = true;
//this.loggedInCheck();
}
@ -102,7 +103,7 @@ login()
}, err => {
console.log(JSON.stringify(err.message));
console.log(err,JSON.stringify(err.message));
if (err.message == "New password is required.") {
//console.log("if");
this.getCommonSettings()
@ -222,6 +223,10 @@ forgotpassword(){
modalCtrl.present();
modalCtrl.onDidDismiss((data)=>{
console.log(data)
if(data == true){
this.getCommonSettings()
this.navCtrl.setRoot(PasswordPage,{'Username':this.email,'Password':'temp1234'});
}
})
}else{
alert(res.msg);

View File

@ -20,10 +20,16 @@
<ion-content padding>
<mat-form-field style="width: 80%">
<mat-form-field style="width: 60%">
<input matInput placeholder="Enter OTP" #otp
type="text" maxlength="6">
</mat-form-field>
</mat-form-field>
<span style="width: 25%">
<button mat-button *ngIf="timeLeft !=0" style="color: red;"
>{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
<button small ion-button round color="optblue" *ngIf="timeLeft ==0"
(click)="resendOTP()" >{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
</span>
</ion-content>
<ion-footer>
<div align="right" fxLayout="row" fxLayoutAlign="flex-end" style="margin-top: 10px;margin-right: 10px;">

View File

@ -18,8 +18,18 @@ import { ToastProvider } from '../../providers/common-provider/toast';
})
export class OtpPage {
@Input()drop_down_datas
timeLeft: number = 0;
loggedEmailID:any="";
interval;
constructor(private viewCtrl:ViewController,public toast:ToastProvider,public navCtrl: NavController, public navParams: NavParams,public aws: AwsServiceProvider) {
this.timeLeft = 60;
this.interval = setInterval(() => {
if(this.timeLeft > 0) {
this.timeLeft--;
} else {
clearInterval(this.interval);
}
},1000)
}
ngOnInit() {
this.drop_down_datas = this.navParams.get('drop_down_datas');
@ -37,7 +47,7 @@ export class OtpPage {
this.toast.lenderappmessage('Password Reset Successfully');
// alert('Password Reset Successfully');
// this.dialogRef.close();
this.viewCtrl.dismiss();
this.viewCtrl.dismiss(true);
} else
{
alert('OTP is invalid. Plesae enter correct OTP.!');
@ -53,5 +63,24 @@ export class OtpPage {
closeModal() {
this.viewCtrl.dismiss();
}
resendOTP() {
console.log(this.drop_down_datas);
console.log(this.loggedEmailID)
this.timeLeft = 60;
this.aws.generateotp(this.drop_down_datas.split(/\s/).join('')).subscribe(
response => {
// if(response.status == 200)
console.log(response)
this.interval = setInterval(() => {
if(this.timeLeft > 0) {
this.timeLeft--;
} else {
clearInterval(this.interval);
// alert(response.msg);//comment this.
}
},1000)
});
}
}

View File

@ -32,15 +32,16 @@
<ion-row>
<ion-col text-center>
<mat-form-field>
<input matInput type="password"placeholder="New Password" #newpassword style="width: 100%;" required>
<input matInput [type]="hide1 ? 'password' : 'text'" placeholder="New Password" #newpassword style="width: 100%;" required>
<ion-icon size="small" class="passwordIcon" name="{{hide1 ? 'eye-off' : 'eye'}}" matSuffix (click)="hide1 = !hide1">{{hide1 ? 'eye-off' : 'eye'}}</ion-icon>
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Confirm Password" type="password" #confirmPassword style="width: 100%;" required
<input matInput placeholder="Confirm Password" [type]="hide2 ? 'password' : 'text'" #confirmPassword style="width: 100%;" required
>
<ion-icon size="small" class="passwordIcon" name="{{hide2 ? 'eye-off' : 'eye'}}" matSuffix (click)="hide2 = !hide2">{{hide2 ? 'eye-off' : 'eye'}}</ion-icon>
</mat-form-field>
</ion-col>
</ion-row>

View File

@ -33,4 +33,7 @@ page-password {
ion-icon{
font-size:2.2em;
}
.passwordIcon{
color: #f34325 !important;
}
}

View File

@ -26,11 +26,14 @@ export class PasswordPage {
Username:any;
Password:any;
userDetails: any;
hide1: boolean = true;
hide2: boolean = true;
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public commonconstant:ConstantsProvider,public toast:ToastProvider,private events:Events,private constantProvider:ConstantsProvider,
private pdtrigger:PdtriggerProvider) {
this.commonImage = this.commonconstant.commonimage;
this.Username = this.navParams.get('Username');
this.Password = this.navParams.get('Password');
console.log( this.Username, this.Password )
}
ionViewDidLoad() {
@ -38,6 +41,7 @@ export class PasswordPage {
}
setNewPassword(newpass)
{
console.log(this.Username,this.Password);
const mailid = this.Username.split(/\s/).join('');
const Password = this.Password.split(/\s/).join('');
if(newpass !='' && newpass !=null && newpass !== undefined){
@ -46,6 +50,7 @@ export class PasswordPage {
this.aws.dologin(auth).subscribe(res => {
console.log(res);
// this.navCtrl.setRoot(PdListPage);
this.toast.lenderappmessage('Password Successfully Changed..!');
this.getlenderpddetails()
// this.router.navigate(['/home']);
}, err => {

View File

@ -1,9 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<script data-ionic="inject">
(function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='5.0.3';i.staticDir='build/';})(window);
</script>
<meta charset="UTF-8">
<title>Ionic App</title>
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
@ -17,7 +14,7 @@
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
<!-- cordova.js required for cordova apps (remove if not needed) -->
<script src="cordova.js"></script>