fix login

master
ashwaq 6 years ago
parent 0928d55171
commit 4a0ca75f6d

@ -60,6 +60,7 @@ export class AppComponent implements OnInit, AfterViewInit {
ngAfterViewInit() {}
initializeApp() {
this.start = false;
this.menu.enable(false)
this.lazyLoadingService.monitorLazyLoading(15, true);
this.platform.ready().then(() => {
this.ts.loadResources(() => {

@ -237,12 +237,12 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log("success");
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
// alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList.EMPLOYEE_NAME);
// alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList[0].EMPLOYEE_NAME);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME;
// this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.remeberMyInfo();
@ -325,7 +325,7 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
// this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);

@ -496,9 +496,13 @@ console.log("successful insertMobileLogin" );
const key = e.which;
const t = e.target;
let sib = t.nextElementSibling;
let sibPre =t.previousElementSibling;
if (key !== 9 && (key < 48 || key > 57)) {
if (key === 8 || key === 46) {
return true;
} else {
e.preventDefault();
@ -509,11 +513,13 @@ console.log("successful insertMobileLogin" );
if (key === 9) {
return true;
}
if (sib) {
//sib = document.querySelector('input');
if (e.target.value) {
if (e.target.value ==="") {
sibPre.setFocus()}
else{
sib.setFocus();
}
}
}
// } else {
@ -523,6 +529,6 @@ console.log("successful insertMobileLogin" );
}
}

@ -172,6 +172,8 @@ export class HomePage implements OnInit {
}
ngOnInit() {
this.menu.enable(true)
// this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {

Loading…
Cancel
Save