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 40ce8b47..fc6f99e2 100644 --- a/Mohem/src/app/authentication/check-user/check-user.component.html +++ b/Mohem/src/app/authentication/check-user/check-user.component.html @@ -6,25 +6,16 @@ {{'login,forgot-password' | translate}} - - - - - {{ts.trPK('login','username')}} - - + + - - - -
diff --git a/Mohem/src/app/authentication/check-user/check-user.component.ts b/Mohem/src/app/authentication/check-user/check-user.component.ts index b510b256..ba44cdbe 100644 --- a/Mohem/src/app/authentication/check-user/check-user.component.ts +++ b/Mohem/src/app/authentication/check-user/check-user.component.ts @@ -6,11 +6,8 @@ import { AlertController } from '@ionic/angular'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request'; import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response'; -import { CheckActivationCodeRequest } from 'src/app/hmg-common/services/authentication/models/check-activation-code.request'; import { SmsReaderService } from 'src/app/hmg-common/services/sms/sms-reader.service'; -import { ForgotFileIDResponse } from '../../hmg-common/services/authentication/models/forgot-File-ID.response'; import { InternationalMobileComponent } from 'src/app/hmg-common/ui/mobile-number/international-mobile/international-mobile.component'; -import { CountryCode } from 'src/app/hmg-common/ui/mobile-number/international-mobile/models/country-code.model'; import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; import { Password } from '../models/password'; @@ -21,7 +18,7 @@ import { LoginModel } from '../models/LoginModel'; templateUrl: './check-user.component.html', styleUrls: ['./check-user.component.scss'], }) -export class CheckUserComponent implements OnInit,OnDestroy { +export class CheckUserComponent implements OnInit { public P_USER_NAME : string; private loginData = new LoginModel(); @@ -37,10 +34,6 @@ export class CheckUserComponent implements OnInit,OnDestroy { ngOnInit() {} - ngOnDestroy(): void { - this.smsService.stopSMSMonitoring(); - } - public onForgot() { this.sendSMSForForgotPassword(); } @@ -53,17 +46,12 @@ export class CheckUserComponent implements OnInit,OnDestroy { this.authService.checkUserAuthentication( request, () => { - //this.sendSMSForForgotPassword(); + /* Write code for error */ }, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => { if (this.cs.validResponse(result)) { this.checkUserResult = result; this.cs.stopLoading(); this.sendSMSForForgotPassword(); - - // if (result.isSMSSent) { - // this.startReceivingSMS(); - // this.presentSMSPasswordDialog(); - // } } }); } @@ -76,11 +64,12 @@ export class CheckUserComponent implements OnInit,OnDestroy { changePwdObj.MobileNumber= this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER; changePwdObj.P_USER_NAME=this.P_USER_NAME; changePwdObj.P_MOBILE_NUMBER=this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER; - + this.authService.sendPublicSMS( changePwdObj, () => { - this.sendSMSForForgotPassword(); + //this.sendSMSForForgotPassword(); + /* Write code for error */ }, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => { if (this.cs.validResponse(result)) { this.checkUserResult = result; @@ -94,5 +83,4 @@ export class CheckUserComponent implements OnInit,OnDestroy { this.cs.openSMSPage(); }}); } -} - +} \ No newline at end of file diff --git a/Mohem/src/app/authentication/forgot/forgot.component.ts b/Mohem/src/app/authentication/forgot/forgot.component.ts index 26fba950..92865083 100644 --- a/Mohem/src/app/authentication/forgot/forgot.component.ts +++ b/Mohem/src/app/authentication/forgot/forgot.component.ts @@ -4,13 +4,9 @@ import { AuthenticationService } from 'src/app/hmg-common/services/authenticatio import { Router } from '@angular/router'; import { AlertController } from '@ionic/angular'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; -import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request'; import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response'; -import { CheckActivationCodeRequest } from 'src/app/hmg-common/services/authentication/models/check-activation-code.request'; import { SmsReaderService } from 'src/app/hmg-common/services/sms/sms-reader.service'; -import { ForgotFileIDResponse } from '../../hmg-common/services/authentication/models/forgot-File-ID.response'; import { InternationalMobileComponent } from 'src/app/hmg-common/ui/mobile-number/international-mobile/international-mobile.component'; -import { CountryCode } from 'src/app/hmg-common/ui/mobile-number/international-mobile/models/country-code.model'; import { ForgetPassword } from '../models/forget.password'; import { LoginModel } from '../models/LoginModel'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; @@ -20,7 +16,7 @@ import { SharedDataService } from 'src/app/hmg-common/services/shared-data-servi templateUrl: './forgot.component.html', styleUrls: ['./forgot.component.scss'] }) -export class ForgotComponent implements OnInit,OnDestroy { +export class ForgotComponent implements OnInit { private loginData = new LoginModel(); public P_NEW_PASSWORD: string; @@ -42,10 +38,6 @@ export class ForgotComponent implements OnInit,OnDestroy { ngOnInit() { } - ngOnDestroy(): void { - this.smsService.stopSMSMonitoring(); - } - public onForgot() { this.sendSMSForForgotPassword(); } @@ -81,7 +73,7 @@ export class ForgotComponent implements OnInit,OnDestroy { if (this.cs.validResponse(result)) { this.checkUserResult = result; console.log(result); - this.cs.toastPK("changePassword","passwordchanged"); + this.cs.toastPK("changePassword","successChange"); this.cs.openLogin(); } }); diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts index 6c9ee3bf..4e3b310b 100644 --- a/Mohem/src/app/authentication/login/login.component.ts +++ b/Mohem/src/app/authentication/login/login.component.ts @@ -1,25 +1,12 @@ -import { - Component, - OnInit, - ViewChild, - ChangeDetectorRef, - NgZone, - OnDestroy -} from "@angular/core"; +import { Component, OnInit, NgZone, OnDestroy } from "@angular/core"; import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; import { Router } from "@angular/router"; import { AlertController } from "@ionic/angular"; import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { CheckUserAuthenticationRequest } from "src/app/hmg-common/services/authentication/models/check-user-auth.request"; import { CheckUserAuthenticationResponse } from "src/app/hmg-common/services/authentication/models/check-user-auth.response"; -import { CheckActivationCodeResponse } from "src/app/hmg-common/services/authentication/models/check-activation-code.response"; import { SmsReaderService } from "src/app/hmg-common/services/sms/sms-reader.service"; -import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; -import { PATIENT_TYPE } from "src/app/hmg-common/services/models/patient.type"; import { FingerprintAIO } from "@ionic-native/fingerprint-aio/ngx"; -import { GetLoginInfoRequest } from "src/app/hmg-common/services/authentication/models/get-login-info.request"; -import { GetLoginInfoResponse } from "src/app/hmg-common/services/authentication/models/get-login-info.response"; import { Device } from "@ionic-native/device/ngx"; import { SplashScreen } from "@ionic-native/splash-screen/ngx"; import { SharedDataService } from "src/app/hmg-common/services/shared-data-service/shared-data.service"; @@ -27,439 +14,95 @@ import { LoginModel } from "../models/LoginModel"; import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request"; @Component({ - selector: "login", - templateUrl: "./login.component.html", - styleUrls: ["./login.component.scss"] + selector: "login", + templateUrl: "./login.component.html", + styleUrls: ["./login.component.scss"] }) export class LoginComponent implements OnInit, OnDestroy { - appLang: number = 1; - isExpired: boolean = false; - isSupportAr: boolean = false; - isAppleStore: boolean = false; - memberLogin: any = {}; - private password: string; - private language: string; - private username: string; - private currentLang: any = 1; - private patientOutSA: boolean; - private loginTokenID: string; - private isMobileFingerPrint: boolean; - private FingerPrintPatientIdentificationID: string; - private loginData = new LoginModel(); - constructor( - public cs: CommonService, - public authService: AuthenticationService, - public router: Router, - public alertController: AlertController, - public ts: TranslatorService, - public smsService: SmsReaderService, - private faio: FingerprintAIO, - public ngZone: NgZone, - public device: Device, - public splash: SplashScreen, - public sharedData: SharedDataService - ) {} - - ngOnInit() {} - - ngOnDestroy(): void { - this.backClicked(); - } - public changeLanguage() { - this.ts.switchLanguage(); - if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) { - this.language = "US"; - } else { - this.language = "AR"; + appLang: number = 1; + isExpired: boolean = false; + isSupportAr: boolean = false; + isAppleStore: boolean = false; + memberLogin: any = {}; + private password: string; + private language: string; + private username: string; + private currentLang: any = 1; + private patientOutSA: boolean; + private loginTokenID: string; + private isMobileFingerPrint: boolean; + private FingerPrintPatientIdentificationID: string; + private loginData = new LoginModel(); + constructor( + public cs: CommonService, + public authService: AuthenticationService, + public router: Router, + public alertController: AlertController, + public ts: TranslatorService, + public smsService: SmsReaderService, + private faio: FingerprintAIO, + public ngZone: NgZone, + public device: Device, + public splash: SplashScreen, + public sharedData: SharedDataService + ) { } + + ngOnInit() { } + + ngOnDestroy(): void { + this.backClicked(); } - this.currentLang = TranslatorService.getCurrentLanguageCode(); - } - // private checkIfLoggedInBefore() { - // this.cs.startLoading(); - // // check if user logged in before - // this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { - // if (user) { - // this.startBiometricLogin(user); - // } else { - // this.hideSplashScreen(true); - // } - // }); - // } - private forgetPasswordPage() { - this.cs.openUserForgot(); - } - private hideSplashScreen(stopLoading = false) { - // this.splash.hide(); - if (stopLoading) { - this.cs.stopLoading(); - } - } - // private startBiometricLogin(user: AuthenticatedUser) { - // this.faio.isAvailable().then((options) => { - // this.hideSplashScreen(true); - // if (user.biometricEnabled) { - // // ask if login with face or finger - // this.cs.presentConfirmDialog( - // this.ts.trPK('login', options), - // () => this.presentBiometricDialog(user), - // () => { } - // ); - // } else { - // // ask to enable biometric - // this.getPermissionToActivateBiometric(user); - // } - // }, () => { - // this.hideSplashScreen(true); - // }); - // } - - private getPermissionToActivateBiometric(user: AuthenticatedUser) { - this.cs.presentConfirmDialog( - this.ts.trPK("login", "enable-biometric"), - () => { - user["biometricEnabled"] = true; - this.authService - .updateLoggedInUser(user) - .subscribe((success: boolean) => { - this.presentBiometricDialog(user); - }); - }, - () => {} - ); - } - /* - activate biometric login for this user - */ - private getMobileInfo(user: AuthenticatedUser) { - this.authService - .getLoginInfo( - new GetLoginInfoRequest(user), - () => {}, - this.ts.trPK("general", "ok") - ) - .subscribe((result: GetLoginInfoResponse) => { - if (this.cs.validResponse(result)) { - if (!result.SMSLoginRequired) { - this.loginTokenID = result.LogInTokenID; - this.patientOutSA = result.PatientOutSA; - this.initializeForAuthentictedUser(user); - // sms for register the biometric - if (result.isSMSSent) { - this.startListeneingForSMS( - this.ts.trPK("general", "enter-sms-enable-biometric") - ); - } else { - this.checkActivationCode(); - } - } + public changeLanguage() { + this.ts.switchLanguage(); + if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) { + this.language = "US"; + } else { + this.language = "AR"; } - }); - } - - private initializeForAuthentictedUser(user: AuthenticatedUser) { - this.ngZone.run(() => { - //this.isMobileFingerPrint = true; - //this.FingerPrintPatientIdentificationID = user.IdentificationNo; - //this.mobileNumber = user.MobileNumber; - //this.zipCode = CountryCode.localCode(user.ZipCode); - }); - } - - private presentBiometricDialog(user) { - this.faio - .show({ - clientId: "Fingerprint Authetnciation", - clientSecret: "Ate343_9347lajF", // Only necessary for Android - disableBackup: true, // Only for Android(optional) - localizedFallbackTitle: this.ts.trPK("login", "use-pin"), // Only for iOS - localizedReason: this.ts.trPK("login", "auth-please") // Only for iOS - }) - .then((result: any) => { - // this.checkActivationCode(); - this.getMobileInfo(user); - }) - .catch((error: any) => console.log(error)); - } - - public onLogin() { - this.checkUserAuthentication(); - } - - // public loginWithMyAccount() { - // // this.loginWithTamer(); - // this.loginWithTamer(); - // } - - /* - TODO to be removed later - */ - // public loginWithEnas() { - // alert('you are doing slient login width enas account '); - // const user = new AuthenticatedUser(); - // user.PatientID = 862616; - - // user.PatientTypeID = PATIENT_TYPE.PERMANENT; - // user.PatientOutSA = false; - // user.TokenID = '@dm!n'; - // user.ProjectID = 0; - // user.NationalityID = '2300948375'; - // user.MobileNo = user.MobileNumber = '554355126'; - // user.ZipCode = '+966'; - // user.Address = 'riyadh'; - // user.FirstName = 'MOHAMED'; - // user.MiddleName = 'yaghi'; - // user.LastName = 'mohammed'; - // user.Age = 30; - // user.agreed = true; - // const birthDate = new Date(); - // birthDate.setFullYear(birthDate.getFullYear() - 29); - // user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate)); - // user.Email = 'Mohamed.Afifi@cloudsolution-sa.com'; - // user.PatientName = 'enas yaghi'; - // this.authService.updateLoggedInUser(user).subscribe(done => { - // this.authService.startIdleMonitoring(); - // this.cs.openHome(); - // }); - // } - - // public loginWithVaccineUser() { - // alert('you are doing slient login width vaccine account '); - // const user = new AuthenticatedUser(); - // user.PatientID = 862616; // user with vaccines in dev - - // user.PatientTypeID = PATIENT_TYPE.PERMANENT; - // user.PatientOutSA = false; - // user.TokenID = '@dm!n'; - // user.NationalityID = '2300948375'; - // user.MobileNo = user.MobileNumber = '554355126'; - // user.ProjectID = 0; - // user.ZipCode = '+966'; - // user.Address = 'riyadh'; - // user.FirstName = 'MOHAMED'; - // user.MiddleName = 'yaghi'; - // user.LastName = 'mohammed'; - // user.Age = 30; - // user.agreed = true; - // const birthDate = new Date(); - // birthDate.setFullYear(birthDate.getFullYear() - 29); - // user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate)); - // user.Email = 'minna.barry@cloudsolution-sa.com'; - // user.PatientName = 'enas yaghi'; - // this.authService.updateLoggedInUser(user).subscribe(done => { - // this.authService.startIdleMonitoring(); - // this.cs.openHome(); - // }); - // } - - // public loginWithEyeMeasureUser() { - // alert('you are doing slient login width eye measurements user account '); - // const user = new AuthenticatedUser(); - // user.PatientID = 873010; - - // user.PatientTypeID = PATIENT_TYPE.PERMANENT; - // user.PatientOutSA = false; - // user.TokenID = '@dm!n'; - // user.NationalityID = '2302581828'; - // user.ProjectID = 0; - // user.MobileNo = user.MobileNumber = '555333541'; - // user.ZipCode = '+966'; - // user.Address = 'riyadh'; - // user.FirstName = 'eye'; - // user.MiddleName = 'user'; - // user.LastName = 'measurment'; - // user.Age = 30; - // user.agreed = true; - // const birthDate = new Date(); - // birthDate.setFullYear(birthDate.getFullYear() - 29); - // user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate)); - // user.Email = 'sultan.khan@hmg.local'; - // user.PatientName = 'eye user'; - // this.authService.updateLoggedInUser(user).subscribe(done => { - // this.authService.startIdleMonitoring(); - // this.cs.openHome(); - // }); - // } - - /* - TODO login with mr rwaid - */ - // public loginWithRwaid() { - // alert('you are doing slient login width mr: rwaid account'); - - // const user = new AuthenticatedUser(); - // // tamer with eye measurments 1231755 - // user.PatientID = 1018977; - // user.PatientTypeID = PATIENT_TYPE.PERMANENT; - // user.ProjectID = 0; - // user.PatientOutSA = false; - // user.TokenID = '@dm!n'; - // user.NationalityID = '1001242559'; - // user.MobileNo = user.MobileNumber = '545156035'; - // user.ZipCode = '+966'; - // user.Address = 'riyadh'; - // user.FirstName = 'rwaid'; - // user.MiddleName = 'el mallah'; - // user.LastName = 'mohammed'; - // user.Age = 30; - // user.agreed = true; - // const birthDate = new Date(); - // birthDate.setFullYear(birthDate.getFullYear() - 29); - // user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate)); - // user.Email = 'mohamed.afifi@cloudsolution-sa.com'; - // user.PatientName = 'rwaid al mallah'; - // this.authService.updateLoggedInUser(user).subscribe(done => { - // this.authService.startIdleMonitoring(); - // this.cs.openHome(); - // }); - - // } - - // public loginWithTamer() { - // alert('you are doing slient login width tamer account'); - - // const user = new AuthenticatedUser(); - // user.PatientID = 1231755; - // user.PatientTypeID = PATIENT_TYPE.PERMANENT; - // user.ProjectID = 0; - // user.PatientOutSA = false; - // user.TokenID = '@dm!n'; - // user.NationalityID = '1001242559'; - // user.MobileNo = user.MobileNumber = '537503378'; - // user.ZipCode = '+966'; - // user.Address = 'riyadh'; - // user.FirstName = 'tamer'; - // user.MiddleName = 'faneshah'; - // user.LastName = 'faneshah'; - // user.Age = 30; - // user.agreed = true; - // const birthDate = new Date(); - // birthDate.setFullYear(birthDate.getFullYear() - 29); - // user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate)); - // user.Email = 'mohamed.afifi@cloudsolution-sa.com'; - // user.PatientName = 'tamer fneshah'; - // this.authService.updateLoggedInUser(user).subscribe(done => { - // this.authService.startIdleMonitoring(); - // this.cs.openHome(); - // }); - - // } - - private startListeneingForSMS(title?: string) { - this.startReceivingSMS(); - //this.presentSMSPasswordDialog(title); - } - - private checkUserAuthentication() { - const request = new LoginRequest(); - request.P_USER_NAME = this.username; - request.P_LANGUAGE = this.language; - request.P_PASSWORD = this.password; - console.log(request); - this.authService - .login(request, () => {}, this.ts.trPK("general", "ok")) - .subscribe((result: CheckUserAuthenticationResponse) => { - if (this.cs.validResponse(result)) { - this.loginData.LogInTokenID = result.LogInTokenID; - this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER; - this.sharedData.setSharedData(this.loginData, "logindata"); - this.cs.openSMSPage(); + this.currentLang = TranslatorService.getCurrentLanguageCode(); + } + private forgetPasswordPage() { + this.cs.openUserForgot(); + } + private hideSplashScreen(stopLoading = false) { + // this.splash.hide(); + if (stopLoading) { + this.cs.stopLoading(); } - }); - } - - public backClicked() { - this.smsService.stopSMSMonitoring(); - } + } - private startReceivingSMS() { - // this.smsModal.presentModal(); - // this.smsService.startSMSMonitoring((code) => { - // this.smsModal.dismiss; - // this.global_code = code; - // SMSService.code = this.global_code; - // this.checkActivationCode(code); - // this.cs.dismissSMSDialog().subscribe(cleared => { - // this.checkActivationCode(code); - // }); - // }); - } - public presentSMSPasswordDialog(title?: string) { - this.cs.presentSMSPasswordDialog( - (code: string) => { - this.checkActivationCode(code); - }, - null, - title - ); - } - private checkActivationCode(readedCode?) { - /*const request = new CheckActivationCodeRequest(); - request.IsMobileFingerPrint = this.isMobileFingerPrint; - request.FingerPrintPatientIdentificationID = this.FingerPrintPatientIdentificationID; - request.LogInTokenID = this.loginTokenID; - request.PatientOutSA = this.patientOutSA ? 1 : 0; - request.activationCode = readedCode || '0000'; - request.IsSilentLogin = !readedCode; - request.PatientMobileNumber = this.mobileNumber; - request.ZipCode = this.zipCode; - request.isRegister = false;*/ - // request.SearchType = this.loginType; - // if (this.loginType === LoginComponent.IDENTIFCIATION_LOGIN_TYPE) { - // request.PatientIdentificationID = this.id; - // request.PatientID = 0; - // } else { - // request.PatientID = Number(this.id); - // request.PatientIdentificationID = ''; - // } - // this.authService.checkActivationCode( - // request, - // () => { - // //this.presentSMSPasswordDialog(); - // this.smsModal.presentModal(); - // }, this.ts.trPK('general', 'retry')).subscribe((result: CheckActivationCodeResponse) => { - // if (this.cs.validResponse(result)) { - // if (this.cs.hasData(result.List)) { - // this.smsService.stopSMSMonitoring(); - // this.checkIfUserAgreedBefore(result); - // } - // } - // }); - } - private checkIfUserAgreedBefore(result: CheckActivationCodeResponse) { - this.authService.setAuthenticatedUser(result).subscribe(() => { - // if (this.authService.isAgreedBefore()) { - // this.cs.openHome(); - // } else { - // // this.cs.openAgreement(); - // } - }); - } + public onLogin() { + this.checkUserAuthentication(); + } - private checkUserAgreement() {} + private checkUserAuthentication() { + this.cs.startLoading(); + const request = new LoginRequest(); + request.P_USER_NAME = this.username; + request.P_LANGUAGE = this.language; + request.P_PASSWORD = this.password; + console.log(request); + this.authService + .login(request, () => { }, this.ts.trPK("general", "ok")) + .subscribe((result: CheckUserAuthenticationResponse) => { + if (this.cs.validResponse(result)) { + this.loginData.LogInTokenID = result.LogInTokenID; + this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER; + this.sharedData.setSharedData(this.loginData, "logindata"); + this.cs.stopLoading(); + this.cs.openSMSPage(); + } + }); + } - public signOut() { - // this.cs.presentConfirmDialog(this.ts.trPK('login', 'sign-out'), - // () => { - // this.authService.clearUser().subscribe(success => { - // this.id = null; - // if (this.countryCode) { - // this.internationlMobile.setMobileNumber(this.countryCode.code, null); - // } - // }); - // }); - } + public backClicked() { + this.smsService.stopSMSMonitoring(); + } - public openForgotID() { - this.cs.openUserForgot(); - } + public openForgotID() { + this.cs.openUserForgot(); + } - public onDismiss() { - // this.global_code = SMSService.code; - //this.checkActivationCode(this.global_code); - } - public onCancelled() { - console.log("Modal pop up cancelled"); - } } 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 51d127af..24a54baa 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -120,8 +120,6 @@ export class SmsPagePage implements OnInit { } } else { let msg: string = this.translate.trPK("general", "noOfTriesLogin"); - //this.common.showAlert(msg); - //this.navCtrl.pop(); goBack this.common.JustAlertDialog(this.translate.trPK("general", "ok"), msg); } } @@ -138,7 +136,6 @@ export class SmsPagePage implements OnInit { .subscribe((result: SMSCheckResponse) => { console.log(result); if (this.common.validResponse(result)) { - //this.sharedData.setSharedData(this.loginData, SmsPagePage.LOGIN_DATA); this.authService.setAuthenticatedUser(result).subscribe(() => { this.common.openHome(); }); @@ -152,8 +149,6 @@ export class SmsPagePage implements OnInit { (request.LogInTokenID = data.LogInTokenID), (request.activationCode = this.activationCode); - //request.P_USER_NAME=this.userName, - //request.MobileNumber=this.member.MemberLoginList.P_MOBILE_NUMBER console.log(data.LogInTokenID); this.authService @@ -162,9 +157,6 @@ export class SmsPagePage implements OnInit { console.log(result); if (this.common.validResponse(result)) { console.log(result); - - //this.loginData.LogInTokenID = result.LogInTokenID; - //this.sharedData.setSharedData(this.loginData, "logindata"); this.common.openForgotPassword(); } }); diff --git a/Mohem/src/app/hmg-common/ui/progressLoading/progress-loading.service.ts b/Mohem/src/app/hmg-common/ui/progressLoading/progress-loading.service.ts index 690e8c69..fdc08358 100644 --- a/Mohem/src/app/hmg-common/ui/progressLoading/progress-loading.service.ts +++ b/Mohem/src/app/hmg-common/ui/progressLoading/progress-loading.service.ts @@ -53,7 +53,7 @@ export class ProgressLoadingService { const template = // tslint:disable-next-line:quotemark "
" + - "" + + "" + "

" + message + "

" + "
"; return template; diff --git a/Mohem/src/assets/icon/moving.gif b/Mohem/src/assets/icon/moving.gif new file mode 100644 index 00000000..95e0fadc Binary files /dev/null and b/Mohem/src/assets/icon/moving.gif differ