From caae8a95379c6dd6d2b8ff6896c79c41e41cc320 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Tue, 7 Apr 2020 17:39:57 +0300 Subject: [PATCH 01/15] fixed loader issue --- .../authentication/sms-page/sms-page.page.ts | 456 ++++-------------- .../authentication/authentication.service.ts | 10 +- 2 files changed, 94 insertions(+), 372 deletions(-) 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 20a94df0..84f03120 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -1,508 +1,235 @@ -import { Component, OnInit } from "@angular/core"; - -import { ElementRef } from "@angular/core"; - -import { NavController, Platform } from "@ionic/angular"; - -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; - -import { CommonService } from "src/app/hmg-common/services/common/common.service"; - -import { SharedDataService } from "src/app/hmg-common/services/shared-data-service/shared-data.service"; - -import { SMSCheckRequest } from "src/app/hmg-common/services/authentication/models/smscheck.request"; - -import { LoginModel } from "../models/LoginModel"; - -import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; - -import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/models/smscheck.response"; - -import { Password } from "../models/password"; - +import { Component, OnInit } from '@angular/core'; +import { ElementRef } from '@angular/core'; +import { NavController, Platform } from '@ionic/angular'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { SMSCheckRequest } from 'src/app/hmg-common/services/authentication/models/smscheck.request'; +import { LoginModel } from '../models/LoginModel'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { SMSCheckResponse } from 'src/app/hmg-common/services/authentication/models/smscheck.response'; +import { Password } from '../models/password'; import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/models/get-login-info.request'; -import * as moment from "moment"; - - +import * as moment from 'moment'; @Component({ - - selector: "app-sms-page", - - templateUrl: "./sms-page.page.html", - - styleUrls: ["./sms-page.page.scss"] - + selector: 'app-sms-page', + templateUrl: './sms-page.page.html', + styleUrls: ['./sms-page.page.scss'] }) export class SmsPageComponent implements OnInit { - - public static LOGIN_DATA = "LOGIN_DATA"; - - Channel: number = 0; - + public static LOGIN_DATA = 'LOGIN_DATA'; + Channel = 0; activationCode: string; - P_SESSION_ID: number; - P_USER_NAME: string; - timeInSeconds: any; - time: any; - runTimer: any; - hasStarted: any; - hasFinished: any; - remainingTime: any; - displayTime: any; - loginTokenID: string; - - public isForgetPwd: boolean = false; - - public isExpiredPwd: boolean = false; - - public count: number = 0; - + public isForgetPwd = false; + public isExpiredPwd = false; + public count = 0; private loginData = new LoginModel(); - - public deviceToken:any; - - public loginTypeData:any; - - public logo = "assets/icon/login/password.png"; - + public deviceToken: any; + public loginTypeData: any; + public logo = 'assets/icon/login/password.png'; + // tslint:disable-next-line: variable-name public smc_code: any = []; code: any; + // tslint:disable-next-line: variable-name user_name: string; - + public isPostNoLoad = true; constructor( - public navCtrl: NavController, - public translate: TranslatorService, - public common: CommonService, - private elementRef: ElementRef, - public authService: AuthenticationService, - public sharedData: SharedDataService, - public platform: Platform, - - - ) {} - - ngOnInit() { - this.count = 0; - this.initTimer(); - this.startTimer(); - - this.isForgetPwd = - - this.sharedData.getSharedData(Password.IS_FORGET_PSW) || false; - - this.isExpiredPwd = - - this.sharedData.getSharedData(Password.IS_EXPIRED_PSW) || false; - - this.loginData= this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); - - console.log("loginData : "+ this.loginData); - - this.deviceToken= this.common.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); - - if(this.deviceToken == undefined){ - - this.deviceToken = localStorage.getItem("deviceToken"); - - - - } - - console.log("deviceToken :"+this.deviceToken); - - this.loginTypeData= this.common.sharedService.getSharedData(SMSCheckRequest.SHARED_DATA, false); - - // console.log("loginType :"+this.loginTypeData.loginType); - - - - - + this.isForgetPwd = this.sharedData.getSharedData(Password.IS_FORGET_PSW) || false; + this.isExpiredPwd = this.sharedData.getSharedData(Password.IS_EXPIRED_PSW) || false; + this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); + console.log('loginData : ' + this.loginData); + this.deviceToken = this.common.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); + // tslint:disable-next-line: triple-equals + if (this.deviceToken == undefined) { + this.deviceToken = localStorage.getItem('deviceToken'); + } + this.loginTypeData = this.common.sharedService.getSharedData(SMSCheckRequest.SHARED_DATA, false); } initTimer() { - - // Pomodoro is usually for 25 minutes - if (!this.timeInSeconds) { - this.timeInSeconds = 600; - } - - - this.time = this.timeInSeconds; - this.runTimer = false; - this.hasStarted = false; - this.hasFinished = false; - this.remainingTime = this.timeInSeconds; - - - this.displayTime = this.common.getSecondsAsDigitalClock(this.remainingTime); - } - - startTimer() { - this.runTimer = true; - this.hasStarted = true; - this.timerTick(); - } - - pauseTimer() { - this.runTimer = false; - } - - resumeTimer() { - this.startTimer(); - } - - timerTick() { - setTimeout(() => { - if (!this.runTimer) { - return; - } - this.remainingTime--; - - this.displayTime = this.common.getSecondsAsDigitalClock( - - this.remainingTime - - ); - + this.displayTime = this.common.getSecondsAsDigitalClock(this.remainingTime); if (this.remainingTime > 0) { - this.timerTick(); - } else { - this.hasFinished = true; - this.pauseTimer(); - this.navCtrl.pop(); - } - }, 1000); - } - - ionViewWillLeave() { - this.pauseTimer(); - } - - - checkOTPLength(){ - - console.log(this.activationCode.length); - - if(this.activationCode.length==4){ - + checkOTPLength() { + // tslint:disable-next-line: triple-equals + if (this.activationCode.length == 4){ this.checkVerificationCode(); - } - } checkVerificationCode() { - this.code=this.smc_code.join(''); - + this.code = this.smc_code.join(''); if (this.count < 3) { - - if ( - - this.code == undefined || - - this.code == null || - - this.code == "" - - ) { - + // tslint:disable-next-line: triple-equals + if (this.code == undefined || this.code == null || this.code == '') { // this.common.showAlert(this.translate.translate('verificationcode.emptyCode')); - } else { - this.count = this.count + 1; - if (this.isForgetPwd || this.isExpiredPwd) { - this.checkForgetPwdSMS(); - } else { - console.log("checkSMS"); this.checkSMS(); - } - } - } else { - - let msg: string = this.translate.trPK("general", "noOfTriesLogin"); - - this.common.JustAlertDialog(this.translate.trPK("general", "ok"), msg); - + const msg: string = this.translate.trPK('general', 'noOfTriesLogin'); + this.common.JustAlertDialog(this.translate.trPK('general', 'ok'), msg); } - } - - public checkSMS() { - - // alert("checkSMS in page") - console.log("code" + this.code); - const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); - - const request = new SMSCheckRequest(); - - - - request.LogInTokenID = data.LogInTokenID; - - request.activationCode = this.code; //code;this.activationCode; - - request.P_USER_NAME = data.P_USER_NAME; - - request.MobileNumber = data.MobileNumber; - - - - this.authService - - .checkSMS(request, () => {}, this.translate.trPK("general", "ok")) - - .subscribe((result: SMSCheckResponse) => { - - console.log(result); - + const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); + const request = new SMSCheckRequest(); + request.LogInTokenID = data.LogInTokenID; + request.activationCode = this.code; // code;this.activationCode; + request.P_USER_NAME = data.P_USER_NAME; + request.MobileNumber = data.MobileNumber; + this.authService.checkSMS(request, () => {}, this.translate.trPK('general', 'ok')).subscribe((result: SMSCheckResponse) => { if (this.common.validResponse(result)) { - - AuthenticationService.servicePrivilage=result.Privilege_List; - + AuthenticationService.servicePrivilage = result.Privilege_List; this.authService.setAuthenticatedUser(result).subscribe(() => { - - //call insert Mobile Login - console.log("insert"); - localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME); - console.log("empnmae: "+ localStorage.getItem("emp-name")); - // localStorage.setItem("login-at", new Date().toISOString()); - this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME; - - //get date and time of last login - let currDateTime = moment().format('MMM DD , YYYY HH:mm') - localStorage.setItem("login-at",currDateTime); - - if (this.platform.is("cordova")) { - // localStorage.setItem("full-name", result.P_USER_NAME); - + localStorage.setItem('emp-name', result.MemberInformationList[0].EMPLOYEE_NAME); + this.user_name = result.MemberInformationList[0].EMPLOYEE_NAME; + const currDateTime = moment().format('MMM DD , YYYY HH:mm') + localStorage.setItem('login-at', currDateTime); + if (this.platform.is('cordova')) { this.insertMobileLogin(); - } - this.common.openHome(); - - - }); - } - }); - } - - public insertMobileLogin(){ - - console.log("loginData" + this.loginData); - - let request = new GetLoginInfoRequest(); - + const request = new GetLoginInfoRequest(); this.authService.setPublicFields(request); - request.MobileNumber = this.loginData.MobileNumber; - - request.P_USER_NAME=this.loginData.P_USER_NAME; - - request.UserName=this.loginData.P_USER_NAME; - - request.LogInTokenID =this.loginData.LogInTokenID; - - request.CompanyID =1;//CompanyID - - request.DeviceType= this.common.getDeviceType(); - - request.DeviceToken=this.deviceToken;//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken; - - request.LoginType=this.loginTypeData.loginType; - - request.EmployeeName=this.user_name; - - this.authService - - .insertMobileLoginInfo( - - request, - - () => { }, - - this.translate.trPK("general", "ok") - - ) - - .subscribe((result: any) => { - - - -console.log("successful insertMobileLogin" ); - - }); - + request.P_USER_NAME = this.loginData.P_USER_NAME; + request.UserName = this.loginData.P_USER_NAME; + request.LogInTokenID = this.loginData.LogInTokenID; + request.CompanyID = 1; // CompanyID + request.DeviceType = this.common.getDeviceType(); + request.DeviceToken = this.deviceToken; // "5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken; + request.LoginType = this.loginTypeData.loginType; + request.EmployeeName = this.user_name; + this.authService.insertMobileLoginInfo(request, () => { }, this.translate.trPK('general', 'ok'), this.isPostNoLoad) + .subscribe((result: any) => { + console.log('successful insertMobileLogin' ); + }); } - - public checkForgetPwdSMS() { - const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); - const request = new SMSCheckRequest(); - - - request.LogInTokenID = data.LogInTokenID; - - request.activationCode =this.code;// this.activationCode; - + request.activationCode = this.code; // this.activationCode; request.P_USER_NAME = data.P_USER_NAME; - - console.log(data.LogInTokenID); - - console.log(data.P_USER_NAME); - - - - this.authService - - .checkForgetSMS(request, () => {}, this.translate.trPK("general", "ok")) - - .subscribe((result: SMSCheckResponse) => { - - console.log(result); - + this.authService.checkForgetSMS(request, () => {}, this.translate.trPK('general', 'ok')).subscribe((result: SMSCheckResponse) => { if (this.common.validResponse(result)) { - - console.log(result); - if (this.isForgetPwd) { - this.common.openForgotPassword(); - - } - - if(this.isExpiredPwd) { - - this.sharedData.setSharedData(true,Password.IS_EXPIRED_PSW); - + } + if (this.isExpiredPwd) { + this.sharedData.setSharedData(true, Password.IS_EXPIRED_PSW); this.common.openChangePassword(); - } - } - }); - } + onChange() { - const filtered = this.smc_code.filter(function (el) { + // tslint:disable-next-line: only-arrow-functions + const filtered = this.smc_code.filter(function(el) { if (el) { return el; } }); if (filtered.length === 4) { - //this.validate(); - console.log("validate"); this.checkVerificationCode(); } } goToNextInput(e) { - // let value = e.target.value; - // if (value.length === 1) { const key = e.which; const t = e.target; - let sib = t.nextElementSibling; - let sibPre =t.previousElementSibling; + const sib = t.nextElementSibling; + const sibPre = t.previousElementSibling; if (key !== 9 && (key < 48 || key > 57)) { if (key === 8 || key === 46) { - - - return true; } else { e.preventDefault(); @@ -513,22 +240,13 @@ console.log("successful insertMobileLogin" ); if (key === 9) { return true; } + if (sib) { - //sib = document.querySelector('input'); - if (e.target.value ==="") { - sibPre.setFocus()} - else{ + if (e.target.value === '') { + sibPre.setFocus(); + } else { sib.setFocus(); - } } } - // } else { - // e.target.value = value.substring(0, value.length - 1); - // } - - - - - - -} \ No newline at end of file + } +} 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 d418cfc5..9c2bcca4 100644 --- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts +++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts @@ -555,10 +555,14 @@ export class AuthenticationService { - public insertMobileLoginInfo(request: GetLoginInfoRequest,onError: any, errorLabel: string): Observable { + // tslint:disable-next-line: max-line-length + public insertMobileLoginInfo(request: GetLoginInfoRequest, onError: any, errorLabel: string, isPostNoLoad = false): Observable { this.authenticateRequest(request); - - return this.con.post(AuthenticationService.insertMobileLoginInfo,request,onError,errorLabel); + if (isPostNoLoad) { + return this.con.postNoLoad(AuthenticationService.insertMobileLoginInfo, request, onError, errorLabel); + } else { + return this.con.post(AuthenticationService.insertMobileLoginInfo, request, onError, errorLabel); + } } From 45f20fdd591defeaf5f50ad573663c6c076cabbc Mon Sep 17 00:00:00 2001 From: ashwaq Date: Tue, 7 Apr 2020 18:56:09 +0300 Subject: [PATCH 02/15] fix --- .../work-list-replacement-roll.component.html | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html index 74d460f2..2a655824 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html @@ -56,12 +56,11 @@
- {{"replacementRoll, question" | translate}} : - {{pQuestion}} ? - {{"replacementRoll, answer" | translate}} - - {{"replacementRoll, enterNote" | translate}} - + {{"replacementRoll, question" | translate}} : + {{pQuestion}} ? + {{"replacementRoll, answer" | translate}} + + @@ -147,13 +146,10 @@ -
- {{"replacementRoll, question" | translate}} : - {{pQuestion}} ? - {{"replacementRoll, answer" | translate}} - - {{"replacementRoll, enterNote" | translate}} - +
+ + {{"replacementRoll, enterNote" | translate}} + From 2903783e4142f0c91eba9d7049c00a9b8cdca91d Mon Sep 17 00:00:00 2001 From: ashwaq Date: Wed, 8 Apr 2020 15:33:05 +0300 Subject: [PATCH 03/15] fix forget password --- .../app/authentication/check-user/check-user.component.html | 2 +- .../confirm-login/confirm-login.component.html | 4 ++-- Mohem/src/app/authentication/sms-page/sms-page.page.ts | 6 +++++- Mohem/src/assets/localization/i18n.json | 6 +++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Mohem/src/app/authentication/check-user/check-user.component.html b/Mohem/src/app/authentication/check-user/check-user.component.html index 0f28d541..841a2b96 100644 --- a/Mohem/src/app/authentication/check-user/check-user.component.html +++ b/Mohem/src/app/authentication/check-user/check-user.component.html @@ -23,7 +23,7 @@ diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.html b/Mohem/src/app/authentication/confirm-login/confirm-login.component.html index 9e1c419b..95971d3d 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.html +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.html @@ -32,8 +32,8 @@

{{ts.trPK('login','verify-login-with')}}

-

{{ts.trPK('login','verify-fingerprint')}}

-

{{ts.trPK('login','verify-faceId')}}

+

{{ts.trPK('login','verify-fingerprint')}}

+

{{ts.trPK('login','verify-faceId')}}

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 2d15e3e7..d2250468 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -139,9 +139,13 @@ export class SmsPageComponent implements OnInit { console.log("deviceToken :"+this.deviceToken); this.loginTypeData= this.common.sharedService.getSharedData(SMSCheckRequest.SHARED_DATA, false); + if( this.loginTypeData){ this.loginType=this.loginTypeData.loginType; - console.log("loginType :"+this.loginTypeData.loginType); + console.log("loginType :"+this.loginTypeData.loginType); + }else{ + this.loginType=1; + } diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 94277c80..1de50935 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -161,10 +161,14 @@ "en": "Verify its you", "ar": "Verify its you" }, - "check-user-text1":{ + "check-user-place-holder":{ "en":"Employee ID", "ar":"رقم الموظف " }, + "check-user-text1": { + "en": "Please Enter your Employee ID, A ", + "ar": "يرجى ادخال رقم الموظف " + }, "check-user-text2": { "en": "login Code ", "ar": "رمز تسجيل الدخول" From 579b7bd18f1b0084864470d75c66ade0e945750f Mon Sep 17 00:00:00 2001 From: ashwaq Date: Wed, 8 Apr 2020 16:57:34 +0300 Subject: [PATCH 04/15] fix back of update the form --- Mohem/src/app/eit/add-eit/add-eit.component.html | 11 ++++++----- Mohem/src/app/eit/add-eit/add-eit.component.ts | 3 ++- .../eit-update-list/eit-update-list.component.ts | 13 +++++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.html b/Mohem/src/app/eit/add-eit/add-eit.component.html index 57c528f6..9b604048 100644 --- a/Mohem/src/app/eit/add-eit/add-eit.component.html +++ b/Mohem/src/app/eit/add-eit/add-eit.component.html @@ -16,17 +16,18 @@ --> - + (trigger)="closeModal()" + > + - - + -->
diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.ts b/Mohem/src/app/eit/add-eit/add-eit.component.ts index 48ab9c4d..38259c00 100644 --- a/Mohem/src/app/eit/add-eit/add-eit.component.ts +++ b/Mohem/src/app/eit/add-eit/add-eit.component.ts @@ -417,7 +417,8 @@ export class AddEitComponent implements OnInit { } } - closemodal() { + closeModal() { + console.log("closeModal"); this.updatedValues = []; this.modalController.dismiss(); } diff --git a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts index 6a8681bf..98431cd3 100644 --- a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts +++ b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts @@ -46,12 +46,17 @@ export class EitUpdateListComponent implements OnInit { modal.onDidDismiss() .then((data: any) => { - console.log("data" + data); - console.log("data" + data.data.updated); - console.log("data" + data.data.eitRequest.EITTransactionTBL); + // console.log("data" + data); + // console.log("data" + data.data.updated); + // console.log("data" + data.data.eitRequest.EITTransactionTBL); - if (data) { + + if(data.data == undefined) + { + return; + } + else if (data.data) { this.updatedData = this.updatedData ? this.updatedData.concat(data.data.updated) : data.data.updated; this.notificationBodyRes[index].Collection_Notification = data.data.updated; this.updateTransactionList(data.data.eitRequest.EITTransactionTBL); From 0f84f35d5a04338e780d6cf37c6c09529dda2f92 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Thu, 9 Apr 2020 11:53:52 +0300 Subject: [PATCH 05/15] fix sms text, RFC Empty,Notifi-P_information --- .../confirm-login/confirm-login.component.ts | 14 ++++++++++++-- .../app/authentication/sms-page/sms-page.page.html | 6 +++--- .../app/authentication/sms-page/sms-page.page.ts | 4 +++- .../hmg-common/services/common/common.service.ts | 10 +++++++++- .../work-list-rfc/work-list-rfc.component.html | 8 +++++--- .../worklist-main/worklist-main.component.html | 3 ++- .../worklist-main/worklist-main.component.scss | 9 +-------- Mohem/src/assets/localization/i18n.json | 4 ++++ Mohem/src/theme/worklist.scss | 11 +++++++++++ 9 files changed, 50 insertions(+), 19 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 6cc023cc..d2c073bd 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -318,6 +318,12 @@ export class ConfirmLoginComponent implements OnInit { console.log(el.value); localStorage.setItem("login-type",el.value); console.log("login-type: "+ localStorage.getItem("login-type")) + if(this.FFloginType == 3 || this.FFloginType == 2 ){ + this.cs.setActiveTypeLogin(el.value); + }else{ + this.cs.setActiveTypeLogin(0); + + } this.loginWithSMS(el); break; @@ -339,7 +345,7 @@ export class ConfirmLoginComponent implements OnInit { console.log(el.value); - + this.faceReconization(el); break; @@ -349,8 +355,12 @@ export class ConfirmLoginComponent implements OnInit { console.log(el.value); localStorage.setItem("login-type",el.value); + if(this.FFloginType == 3 || this.FFloginType == 2 ){ + this.cs.setActiveTypeLogin(el.value); + }else{ + this.cs.setActiveTypeLogin(0); - + } this.loginWithWhatsapp(el); break; diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.html b/Mohem/src/app/authentication/sms-page/sms-page.page.html index 194c34c6..c9d9d569 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.html +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.html @@ -21,9 +21,9 @@

{{'verificationcode,title' | translate}} {{'verificationcode,verificationcode' | translate}} {{'verificationcode,by' | translate}} - {{'verificationcode , sms' | translate}} - {{'verificationcode , whatsapp' | translate}} - + {{'verificationcode , sms' | translate}} + {{'verificationcode , whatsapp' | translate}} + {{'verificationcode,instruct' | translate}} {{'general,submit' | translate}}

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 d2250468..f3ef1889 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -82,6 +82,7 @@ export class SmsPageComponent implements OnInit { code: any; user_name: string; loginType: any; + activeType: any; constructor( @@ -107,7 +108,8 @@ export class SmsPageComponent implements OnInit { ngOnInit() { - + this.activeType=this.common.getActiveTypeLogin(); + console.log("activeType :"+this.activeType); this.count = 0; this.initTimer(); diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 42d94901..557390a6 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -81,6 +81,7 @@ export class CommonService { public updateImage:boolean=false; public setUpdateImg:any; DT: any; + activeType: any; constructor( public nav: NavController, public router: Router, @@ -1430,5 +1431,12 @@ public getMonthNameAr(value: number): string { return this.DT; } - + setActiveTypeLogin(activeType){ + this.activeType=activeType; + } + + getActiveTypeLogin(){ + return this.activeType; + } + } diff --git a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.html b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.html index 1b542584..b0ec7d39 100644 --- a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.html +++ b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.html @@ -10,9 +10,9 @@
-
+