diff --git a/src/pages/auth/auth.html b/src/pages/auth/auth.html
index 3a21d41..d65a281 100755
--- a/src/pages/auth/auth.html
+++ b/src/pages/auth/auth.html
@@ -17,19 +17,24 @@
PIN
+ Should be 4 digit
-
+
-
@@ -37,7 +42,10 @@
-
+
+
+
+
@@ -61,10 +69,15 @@
-
+
+
+
+
diff --git a/src/pages/auth/auth.scss b/src/pages/auth/auth.scss
index 31aeb54..4c249f2 100755
--- a/src/pages/auth/auth.scss
+++ b/src/pages/auth/auth.scss
@@ -5,7 +5,7 @@ page-auth {
.mat-card{
width: 80%;
margin-left: 10%;
- margin-top: 35%;
+ margin-top: 15%;
border-radius: 10px;
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;
}
@@ -33,5 +33,7 @@ page-auth {
ion-icon{
font-size:2.2em;
}
-
+ input.mat-input-element {
+ -webkit-text-security: disc;
+ }
}
\ No newline at end of file
diff --git a/src/pages/auth/auth.ts b/src/pages/auth/auth.ts
index f6aff0a..0a700a0 100755
--- a/src/pages/auth/auth.ts
+++ b/src/pages/auth/auth.ts
@@ -32,6 +32,7 @@ pin:any;
mpinaccess:boolean =false;
newpassword:any;
ConfirmPassword:any;
+ isPinReset: boolean;
constructor(public navCtrl: NavController, public navParams: NavParams,public Menu:MenuController,public fb:FormBuilder,public shared:CognitoServiceProvider,public toast:ToastProvider,public faio:FingerprintAIO,public aws:AwsServiceProvider,public loadingCtrl:LoadingProvider,public commonconstant:ConstantsProvider) {
let pinLockImage = localStorage.getItem('pinLockImage')
@@ -93,9 +94,31 @@ pin:any;
//console.log(this.mpinaccess);
});
}
- setnewpin(newpin)
+ resetPin() {
+ this.isPinReset = true
+ this.mpinaccess = true
+ }
+ goBack() {
+ this.isPinReset = false
+ this.mpinaccess = false
+ }
+ setnewpin(newpin,confirmPin)
{
- this.aws.userpinupdate(newpin).subscribe(res=>
+ if(!newpin.checkValidity()) {
+ alert(newpin.validationMessage)
+ return;
+ }
+ // let confirmPin:any = document.getElementById('confirmPassword')
+ console.log(confirmPin)
+ if(newpin.value.toString().length < 4) {
+ this.toast.lenderappmessage("Pin must be 4 digit");
+ return;
+ }
+ if(newpin.value != confirmPin.value) {
+ this.toast.lenderappmessage("Confirm Pin does not match.")
+ return;
+ }
+ this.aws.userpinupdate(newpin.value).subscribe(res=>
{
this.newpindetails = res;
if(this.newpindetails.dataStatus == true)
@@ -108,6 +131,12 @@ pin:any;
// else{
// this.navCtrl.setRoot(PdListPage,{'userDetails':this.userDetails});
// }
+ if(this.userDetails[0].mpin != null) {
+ this.toast.lenderappmessage("Pin Reset Successfully")
+ this.userDetails[0].mpin = newpin.value
+ this.mpinaccess = false
+ }
+ else{
let role=this.commonconstant.takeDecisionRouting(this.userDetails[0])
if(role == 'sales'){
this.navCtrl.setRoot(SalesPDlistPage);
@@ -115,6 +144,7 @@ pin:any;
else{
this.navCtrl.setRoot(PdListPage,{'userDetails':this.userDetails});
}
+ }
// this.navCtrl.setRoot(PdListPage);
}
})
diff --git a/src/pages/sales_pd/pages/sales-p-dlist/sales-p-dlist.ts b/src/pages/sales_pd/pages/sales-p-dlist/sales-p-dlist.ts
index 51bed0b..ad07f26 100755
--- a/src/pages/sales_pd/pages/sales-p-dlist/sales-p-dlist.ts
+++ b/src/pages/sales_pd/pages/sales-p-dlist/sales-p-dlist.ts
@@ -259,6 +259,15 @@ export class SalesPDlistPage {
let actionSheet = this.actionSheetCtrl.create({
title: 'Select Option',
buttons: [
+ // {
+ // text: 'Edit Data',
+ // icon:'edit',
+ // role: 'destructive1',
+ // handler: () => {
+ // this.editForm(value_obj)
+ // // console.log('pdf check',this.salesPDpdf);
+ // }
+ // },
{
text: 'View Report',
icon:'eye',