From 0928d551717d39d4ae04da6b36df07e34278a271 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 27 Feb 2020 14:18:48 +0300 Subject: [PATCH] edit home last login way --- .../confirm-login/confirm-login.component.ts | 25 +++++++++++-------- .../ui/welcome-login/welcome.component.ts | 8 +++--- Mohem/src/theme/styles.scss | 14 +++++------ 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts index 5c2853a9..a7f708bf 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -634,23 +634,26 @@ export class ConfirmLoginComponent implements OnInit { // this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); - let request = new GetLoginInfoRequest(); + let request ={ + DeviceType: this.cs.getDeviceType(), - this.authService.setPublicFields(request); + DeviceToken:this.deviceToken - request.MobileNumber = this.loginData.MobileNumber; + } ; - request.P_USER_NAME=this.loginData.P_USER_NAME; + // this.authService.setPublicFields(request); - request.UserName=this.loginData.P_USER_NAME; + // request.MobileNumber = this.loginData.MobileNumber; - request.LogInTokenID =this.loginData.LogInTokenID; + // request.P_USER_NAME=this.loginData.P_USER_NAME; - request.CompanyID =1;//cs=1 , HMG=2 + // request.UserName=this.loginData.P_USER_NAME; - request.DeviceType= this.cs.getDeviceType(); + // request.LogInTokenID =this.loginData.LogInTokenID; - request.DeviceToken=this.deviceToken; + // request.CompanyID =1;//cs=1 , HMG=2 + + @@ -668,7 +671,7 @@ export class ConfirmLoginComponent implements OnInit { - private getMobileInfo(request: GetLoginInfoRequest) { + private getMobileInfo(request: any) { console.log("2"); @@ -790,7 +793,7 @@ export class ConfirmLoginComponent implements OnInit { request.DeviceType= this.cs.getDeviceType(); - request.DeviceToken="5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken; + request.DeviceToken=this.deviceToken;//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken; //request.TokenID= diff --git a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts index cd19d7f9..31d50324 100644 --- a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts +++ b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts @@ -87,7 +87,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { false ); - + console.log( this.user); this.userName = localStorage.getItem("user"); this.password = localStorage.getItem("password"); @@ -96,6 +96,8 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { this.logintype= localStorage.getItem("login-type"); this.lastLoginDate= localStorage.getItem("login-at"); + + // this.lastLoginDate= new Date(this.lastLoginDate).toISOString() @@ -185,7 +187,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { console.log(this.confimLogin.buttons[0]); this.confimLogin.buttons[0].forEach(element => { - if (this.logintype === element.value) { + if (this.user.LoginType === element.value) { console.log(this.logintype ); console.log(element.value); console.log("this.logintype === element.value"); @@ -199,7 +201,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { }); } - }, 200); + }, 100); } public moreLoginOptions() {} diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index c0626ee3..c3380444 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1022,10 +1022,10 @@ color: var(--dark); } .checkOutOkBtn{ - /* margin-left: 50px !important; */ - /* margin-right: 55px !important; */ + margin-left: 50px !important; + margin-right: 55px !important; margin-top: 10px !important; - /* margin-bottom: 10px !important; */ + margin-bottom: 10px !important; border-radius: 5px !important; height: 40px !important; min-height: 40px !important; @@ -1042,10 +1042,10 @@ color: var(--dark); } .checkOutCancelBtn{ - /* margin-left: 55px !important; */ - /* margin-right: 55px !important; */ - /* margin-top: 10px !important; */ - /* margin-bottom: 10px !important; */ + margin-left: 50px !important; + margin-right: 55px !important; + margin-top: 10px !important; + margin-bottom: 10px !important; border-radius: 5px !important; height: 40px !important; min-height: 40px !important;