diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.ts index d92065bc..7112bca2 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -421,7 +421,7 @@ export class SmsPageComponent implements OnInit { if (this.common.validResponse(result)) { - + this.common.sharedService.setSharedData(result.MemberLoginList.P_ORACLE_USER_NAME, 'oracle-user-name') //save business card info diff --git a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts index 0a876022..699d1510 100644 --- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts +++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts @@ -107,14 +107,15 @@ export class AuthenticationService { this.setPublicFields(request); const user = this.getAuthenticatedUser(); - if (user) { + const oracleUserName = this.cs.sharedService.getSharedData('oracle-user-name', false); + if (user && oracleUserName) { const userName = this.cs.sharedService.getSharedData(LoginRequest.SHARED_DATA, false); request.P_SESSION_ID = user.P_SESSION_ID; request.MobileNumber = user.EMPLOYEE_MOBILE_NUMBER; request.LogInTokenID = user.LogInTokenID; request.TokenID = user.TokenID; - request.P_USER_NAME = userName; // '1100313582' ALWAYS USER NAME - request.UserName = userName; // '1100313582' + request.P_USER_NAME = oracleUserName; // '1100313582' ALWAYS USER NAME + request.UserName = oracleUserName; // '1100313582' request.P_EMAIL_ADDRESS = user.EMPLOYEE_EMAIL_ADDRESS; if (AuthenticationService.requireRelogin) { this.sessionTimeOutDialog(); diff --git a/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts index 68ca3ab7..9bc59635 100644 --- a/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts +++ b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts @@ -3,6 +3,7 @@ import { Response } from 'src/app/hmg-common/services/models/response'; import { AuthenticatedUser } from './authenticated-user'; import { PrivilageModel } from './privilage-model'; export class SMSCheckResponse extends Response { + MemberLoginList: any = {}; BasicMemberInformation: any = {}; AuthenticationTokenID: string; MemberInformationList:AuthenticatedUser[]; diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index d0ae0502..a5a4abba 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -29,8 +29,8 @@ export class ConnectorService { //public static host = 'https://uat.hmgwebservices.com/'; // public static host = 'https://hmgwebservices.com/'; - //public static host = 'http://10.0.50.241:1010/' // MOE vpn - public static host = 'https://hrmsys.moenergy.gov.sa/' + public static host = 'http://10.0.50.241:1010/' // MOE vpn + // public static host = 'https://hrmsys.moenergy.gov.sa/'