diff --git a/src/pages/auth/auth.html b/src/pages/auth/auth.html
index d65a281..32eb0c2 100755
--- a/src/pages/auth/auth.html
+++ b/src/pages/auth/auth.html
@@ -66,7 +66,7 @@
PIN
-
+
{
this.userDetails = res;
if(this.userDetails.dataStatus == true)
{
+
this.loadingCtrl.loading.dismiss();
this.userDetails = this.userDetails.records;
-
+ this.resetpin=this.navParams.get('resetpin');
+
+ if(this.resetpin==true)
+ {
+
+ this.mpinaccess = true
+ this.isPinReset = true
+ return
+ }
//localStorage.setItem('userDetails',JSON.stringify(this.userDetails[0]));
if(this.userDetails[0].mpin ==null)
{
@@ -93,12 +110,23 @@ pin:any;
//console.log(this.mpinaccess);
});
+
}
+
+ ngOnInit(){
+
+ //this.mpinaccess = true
+ // this.isPinReset = true
+
+ }
+
resetPin() {
- this.isPinReset = true
- this.mpinaccess = true
+
+ this.navCtrl.setRoot(LoginPage,{'resetlogin':this.pinreset});
+
}
goBack() {
+
this.isPinReset = false
this.mpinaccess = false
}
@@ -135,11 +163,13 @@ pin:any;
this.toast.lenderappmessage("Pin Reset Successfully")
this.userDetails[0].mpin = newpin.value
this.mpinaccess = false
+ // alert('gotologinpage');
+ // this.navCtrl.setRoot(LoginPage,{'resetlogin':this.pinreset});
}
else{
let role=this.commonconstant.takeDecisionRouting(this.userDetails[0])
if(role == 'sales'){
- this.navCtrl.setRoot(SalesPDlistPage);
+ this.navCtrl.setRoot(SalesPDlistPage,{'userDetails':this.userDetails});
}
else{
this.navCtrl.setRoot(PdListPage,{'userDetails':this.userDetails});
diff --git a/src/pages/input/input.html b/src/pages/input/input.html
index 96a0b3c..97a8687 100755
--- a/src/pages/input/input.html
+++ b/src/pages/input/input.html
@@ -45,7 +45,7 @@
Select
{{person.user_name}}
-
+
Select
diff --git a/src/pages/login/login.html b/src/pages/login/login.html
index 61c161e..b257132 100755
--- a/src/pages/login/login.html
+++ b/src/pages/login/login.html
@@ -36,7 +36,7 @@
-
+
diff --git a/src/pages/login/login.ts b/src/pages/login/login.ts
index 4dfd691..cec28ea 100755
--- a/src/pages/login/login.ts
+++ b/src/pages/login/login.ts
@@ -22,6 +22,7 @@ import { ConstantsProvider } from '../../providers/constants/constants';
import { SalesPDlistPage } from '../sales_pd/pages/sales-p-dlist/sales-p-dlist';
import { PdtriggerProvider } from '../../providers/pdtrigger/pdtrigger';
import { SalesPdProvider } from '../sales_pd/providers/sales-pd/sales-pd';
+import { AuthPage } from '../auth/auth';
@Component({
@@ -50,12 +51,14 @@ config: MatDialogConfig = {
};
userDetails: any;
commonDetails: any;
-constructor( public aws: AwsServiceProvider, public dialog: MatDialog,
+ forgetpin: boolean = false;
+constructor( public aws: AwsServiceProvider, public dialog: MatDialog, 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.loggedInCheck();
}
@@ -77,8 +80,9 @@ presentLoading() {
dismissOnPageChange: true
}).present();
}
-login() {
- // console.log(this.email);
+login()
+{
+
if(this.email !==undefined && this.password !==undefined && this.email !='' && this.password !='' && this.email !=null && this.password !=null ){
let auth = { 'Username': this.email, 'Password': this.password };
@@ -92,7 +96,7 @@ login() {
-
+
}, err => {
console.log(JSON.stringify(err.message));
@@ -139,7 +143,12 @@ getlenderpddetails()
localStorage.setItem("user_details",JSON.stringify( this.userDetails));
this.events.publish(('len_user_name'),this.userDetails);
let role= this.constantProvider.takeDecisionRouting(this.userDetails)
- if(role == 'sales'){
+ this.forgetpin=this.navParams.get('resetlogin');
+ if( this.forgetpin==true)
+ {
+ this.navCtrl.setRoot(AuthPage,{'resetpin':this.forgetpin});
+ }
+ else if(role == 'sales'){
this.pdtrigger.initiateMasterApis('sales')
this.navCtrl.setRoot(SalesPDlistPage);
@@ -181,10 +190,10 @@ forgotopen() {
forgotpassword() {
-
+ alert('rets');
let auth = { 'Username': this.email };
console.log(auth);
- this.aws.userforgotpass(auth).subscribe(res => {
+ this.aws.userforgotpass(auth).subscribe(res => {
})
diff --git a/src/pages/password/password.ts b/src/pages/password/password.ts
index b9f6f5a..aa40d39 100755
--- a/src/pages/password/password.ts
+++ b/src/pages/password/password.ts
@@ -60,7 +60,7 @@ export class PasswordPage {
let userid = this.aws.getlocale();
this.aws.getuserprofile(userid).subscribe(res=>
{
- this.userDetails = res;
+ this.userDetails = res;
if(this.userDetails.dataStatus == true){
this.userDetails = this.userDetails.records[0];
diff --git a/src/pages/sales_pd/components/ques-template/ques-template.html b/src/pages/sales_pd/components/ques-template/ques-template.html
index df28b6f..db99ad1 100755
--- a/src/pages/sales_pd/components/ques-template/ques-template.html
+++ b/src/pages/sales_pd/components/ques-template/ques-template.html
@@ -9,7 +9,7 @@
-
+
{{parent_ques.get('question').value}}
{{question_data.section_name}}