diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts
index 478f9b15..524386c9 100644
--- a/Mohem/src/app/authentication/login/login.component.ts
+++ b/Mohem/src/app/authentication/login/login.component.ts
@@ -1,41 +1,41 @@
-import { Component, OnInit, ViewChild, ChangeDetectorRef, 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 { 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 { CheckUserAuthenticationResponse } from "src/app/hmg-common/services/authentication/models/check-user-auth.response";
+import { SmsReaderService } from "src/app/hmg-common/services/sms/sms-reader.service";
+import { FingerprintAIO } from "@ionic-native/fingerprint-aio/ngx";
+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";
+import { LoginModel } from "../models/LoginModel";
+import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request";
+import { Password } from '../models/password';
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 { 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 { CountryCode } from 'src/app/hmg-common/ui/mobile-number/international-mobile/models/country-code.model';
-import { SMSService } from 'src/app/hmg-common/ui/sms/service/smsservice';
@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;
+ appLang: number = 1;
+ isExpired: boolean = false;
+ isSupportAr: boolean = false;
+ isAppleStore: boolean = false;
memberLogin: any = {};
- private currentLang : 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,
@@ -46,39 +46,25 @@ export class LoginComponent implements OnInit, OnDestroy {
private faio: FingerprintAIO,
public ngZone: NgZone,
public device: Device,
- public splash: SplashScreen
- ) {
- }
+ public splash: SplashScreen,
+ public sharedData: SharedDataService
+ ) { }
- ngOnInit() {
- //this.setIdPattern();
- setTimeout(() => {
- this.checkIfLoggedInBefore();
- // this.splash.hide();
- }, 100);
- this.currentLang = TranslatorService.getCurrentLanguageCode();
- }
+ ngOnInit() { }
ngOnDestroy(): void {
this.backClicked();
}
- public changeLanguage(){
+ public changeLanguage() {
this.ts.switchLanguage();
+ if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
+ this.language = "US";
+ } else {
+ this.language = "AR";
+ }
this.currentLang = TranslatorService.getCurrentLanguageCode();
- console.log(this.currentLang);
}
- 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(){
+ private forgetPasswordPage() {
this.cs.openUserForgot();
}
private hideSplashScreen(stopLoading = false) {
@@ -87,293 +73,43 @@ export class LoginComponent implements OnInit, OnDestroy {
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();
- }
- }
- }
- });
- }
-
- 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));
- }
-
-
- /**
- we need holders here since the country code maybe is not loaded yet for automatic login
- */
- private mobileNumber: string;
- private zipCode: string;
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 CheckUserAuthenticationRequest();
- request.PatientMobileNumber = this.mobileNumber;
- request.ZipCode = this.zipCode;
- request.isRegister = false;
- request.TokenID = '';
-
- this.authService.checkUserAuthentication(
- request,
- () => {
-
- }, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
+ 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, () => {
+ console.log("error here");
+ //console.log(result.MessageStatus);
+ this.sharedData.setSharedData(true,Password.IS_EXPIRED_PSW);
+ this.userCheck();
+ }, this.ts.trPK("general", "ok"))
+ .subscribe((result: CheckUserAuthenticationResponse) => {
+ console.log("success");
+ this.cs.stopLoading();
if (this.cs.validResponse(result)) {
- this.loginTokenID = result.LogInTokenID;
- this.patientOutSA = result.PatientOutSA;
- this.isMobileFingerPrint = false;
- this.FingerPrintPatientIdentificationID = '';
- if (result.isSMSSent) {
- this.startListeneingForSMS();
- } else {
- this.smsService.stopSMSMonitoring();
- this.checkActivationCode();
- }
+ this.loginData.LogInTokenID = result.LogInTokenID;
+ this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
+ this.loginData.P_USER_NAME=this.username;
+ this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
+ this.cs.openSMSPage();
}
+ // console.log("result.IsPasswordExpired");
+ // console.log(result.IsPasswordExpired);
+ // if(result.IsPasswordExpired)
+ // {
+ // this.presentPasswordExpiredDialog();
+ // }
});
}
@@ -381,103 +117,73 @@ export class LoginComponent implements OnInit, OnDestroy {
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.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 = '';
- // }
- request.isRegister = false;
- // 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();
- }
- });
- }
-
- private checkUserAgreement() {
-
- }
-
- 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);
- // }
-
- // });
- // });
-
-
+ async presentPasswordExpiredDialog()
+ {
+ const alert = await this.alertController.create({
+ header: this.ts.trPK("general","confirm"),
+ message: this.ts.trPK("login","password-expired"),
+ buttons: [
+ {
+ text: this.ts.trPK("general","ok"),
+ handler: () => {
+ console.log('Confirm Okay');
+ this.sharedData.setSharedData(true,Password.IS_EXPIRED_PSW);
+ this.userCheck();
+ }
+ }
+ ]
+ });
+ await alert.present();
}
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");
+ public userCheck()
+ {
+ this.cs.startLoading();
+ const request = new CheckUserAuthenticationRequest();
+ request.P_USER_NAME = this.username;
+ this.authService.checkUserAuthentication(
+ request,
+ () => {
+ /* 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();
+ }
+ });
+ }
+
+ private checkUserResult: CheckUserAuthenticationResponse;
+
+ private sendSMSForForgotPassword() {
+ this.cs.startLoading();
+ let changePwdObj= new LoginRequest();
+ changePwdObj.MobileNumber= this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;
+ changePwdObj.P_USER_NAME=this.username;
+ changePwdObj.P_MOBILE_NUMBER=this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;
+
+ this.authService.sendPublicSMS(
+ changePwdObj,
+ () => {
+ //this.sendSMSForForgotPassword();
+ /* Write code for error */
+ }, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
+ if (this.cs.validResponse(result)) {
+ this.checkUserResult = result;
+ console.log("2");
+ console.log(result);
+ this.loginData.LogInTokenID = result.LogInTokenID;
+ this.loginData.P_USER_NAME = this.username;
+ this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
+ this.sharedData.setSharedData(true,Password.IS_FORGET_PSW);
+ this.cs.stopLoading();
+ this.cs.openSMSPage();
+ }});
}
+
}
diff --git a/Mohem/src/app/authentication/models/LoginModel.ts b/Mohem/src/app/authentication/models/LoginModel.ts
new file mode 100644
index 00000000..5d6a885f
--- /dev/null
+++ b/Mohem/src/app/authentication/models/LoginModel.ts
@@ -0,0 +1,6 @@
+export class LoginModel {
+ LogInTokenID: string;
+ activationCode: string;
+ P_USER_NAME: string;
+ MobileNumber: string;
+}
diff --git a/Mohem/src/app/authentication/models/forget.password.ts b/Mohem/src/app/authentication/models/forget.password.ts
new file mode 100644
index 00000000..b6cda129
--- /dev/null
+++ b/Mohem/src/app/authentication/models/forget.password.ts
@@ -0,0 +1,7 @@
+import { Request } from 'src/app/hmg-common/services/models/request';
+export class ForgetPassword extends Request {
+ public static IS_FORGET_PSW:string="is_forget_password";
+ public P_NEW_PASSWORD: string;
+ public P_Confirm_NEW_PASSWORD:string;
+ public P_USER_NAME : string;
+}
diff --git a/Mohem/src/app/authentication/models/password.ts b/Mohem/src/app/authentication/models/password.ts
new file mode 100644
index 00000000..28820371
--- /dev/null
+++ b/Mohem/src/app/authentication/models/password.ts
@@ -0,0 +1,11 @@
+import { Request } from 'src/app/hmg-common/services/models/request';
+
+
+export class Password extends Request {
+ public static IS_FORGET_PSW:string="is_forget_password";
+ public static IS_EXPIRED_PSW:string="is_expired_password";
+ public IS_FORGET_PWD:boolean;
+ public P_NEW_PASSWORD: string;
+ public P_OLD_PASSWORD:string;
+ public P_Confirm_NEW_PASSWORD:string;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.html b/Mohem/src/app/authentication/sms-page/sms-page.page.html
new file mode 100644
index 00000000..e6d46f1b
--- /dev/null
+++ b/Mohem/src/app/authentication/sms-page/sms-page.page.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{'verificationcode,title' | translate}}{{'verificationcode,verificationcode' | translate}} {{'verificationcode,by' | translate}}{{'verificationcode,sms' | translate}}{{'verificationcode,instruct' | translate}}{{'general,submit' | translate}}
+
+
+
+
+
+
+
{{displayTime}}
+
+
+ {{'verificationcode,verificationcode' | translate}}
+
+
+
+
+
+
+
+ {{'general,submit' | translate}}
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.scss b/Mohem/src/app/authentication/sms-page/sms-page.page.scss
new file mode 100644
index 00000000..5f1c67eb
--- /dev/null
+++ b/Mohem/src/app/authentication/sms-page/sms-page.page.scss
@@ -0,0 +1,21 @@
+.header-toolbar{
+ --background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
+}
+
+.btnBack{
+ background: transparent;
+}
+
+ion-img{
+ width: 180px;
+ height: 180px;
+ background:transparent;
+}
+
+h1{
+ font-size: 28px !important;
+}
+
+span{
+ font-weight: bold;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.spec.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.spec.ts
new file mode 100644
index 00000000..48e022a2
--- /dev/null
+++ b/Mohem/src/app/authentication/sms-page/sms-page.page.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SmsPagePage } from './sms-page.page';
+
+describe('SmsPagePage', () => {
+ let component: SmsPagePage;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ SmsPagePage ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(SmsPagePage);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.ts
new file mode 100644
index 00000000..c6787c87
--- /dev/null
+++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts
@@ -0,0 +1,177 @@
+import { Component, OnInit } from "@angular/core";
+import { ElementRef } from "@angular/core";
+import { NavController } 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";
+
+@Component({
+ 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;
+ 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;
+ private loginData = new LoginModel();
+
+ constructor(
+ public navCtrl: NavController,
+ public translate: TranslatorService,
+ public common: CommonService,
+ private elementRef: ElementRef,
+ public authService: AuthenticationService,
+ public sharedData: SharedDataService
+ ) {}
+
+ 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;
+ }
+
+ 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
+ );
+ if (this.remainingTime > 0) {
+ this.timerTick();
+ } else {
+ this.hasFinished = true;
+ this.pauseTimer();
+ this.navCtrl.pop();
+ }
+ }, 1000);
+ }
+
+ ionViewWillLeave() {
+ this.pauseTimer();
+ }
+
+ checkVerificationCode() {
+ if (this.count < 3) {
+ if (
+ this.activationCode == undefined ||
+ this.activationCode == null ||
+ this.activationCode == ""
+ ) {
+ // this.common.showAlert(this.translate.translate('verificationcode.emptyCode'));
+ } else {
+ this.count = this.count + 1;
+ if (this.isForgetPwd || this.isExpiredPwd) {
+ this.checkForgetPwdSMS();
+ } else {
+ this.checkSMS();
+ }
+ }
+ } else {
+ let msg: string = this.translate.trPK("general", "noOfTriesLogin");
+ this.common.JustAlertDialog(this.translate.trPK("general", "ok"), msg);
+ }
+ }
+
+ public checkSMS() {
+ const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
+ const request = new SMSCheckRequest();
+
+ request.LogInTokenID = data.LogInTokenID;
+ request.activationCode = 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);
+ if (this.common.validResponse(result)) {
+ this.authService.setAuthenticatedUser(result).subscribe(() => {
+ this.common.openHome();
+ });
+ }
+ });
+ }
+
+ public checkForgetPwdSMS() {
+ const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
+ const request = new SMSCheckRequest();
+
+ request.LogInTokenID = data.LogInTokenID;
+ request.activationCode = 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);
+ 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);
+ this.common.openChangePassword();
+ }
+ }
+ });
+ }
+}
diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts
index efc962c2..154867ad 100644
--- a/Mohem/src/app/hmg-common/hmg-common.module.ts
+++ b/Mohem/src/app/hmg-common/hmg-common.module.ts
@@ -46,7 +46,7 @@ import { UserLocalNotificationService } from './services/user-local-notification
import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
import { EmailComponent } from './ui/email/email.component';
import { Badge } from '@ionic-native/badge/ngx';
-import { Push } from '@ionic-native/push/ngx';
+// import { Push } from '@ionic-native/push/ngx';
import { PushService } from './services/push/push.service';
import { LifeCycleService } from './services/life-cycle/life-cycle.service';
import { HmgBrowserService } from './services/hmg-browser/hmg-browser.service';
@@ -69,7 +69,6 @@ import { Keyboard } from '@ionic-native/keyboard/ngx';
import { KeyboardService } from './services/keyboard/keyboard.service';
import { DevicePermissionsService } from './services/device-permissions/device-permissions.service';
import { SegmentsComponent } from './ui/segments/segments.component';
-import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { AccordionComponent } from './ui/accordion/accordion.component';
import { AccordionTabComponent } from './ui/accordion/accordion-tab/accordion-tab.component';
import { TwoOptionSelectComponent } from './ui/two-option-select/two-option-select.component';
@@ -90,6 +89,7 @@ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service';
import { PaymentComponent } from './ui/payment/payment.component';
import { PaymentService } from './ui/payment/service/payment.service';
+import { MenuService } from './services/menu/menuservice.service';
@NgModule({
imports: [
CommonModule,
@@ -217,7 +217,6 @@ import { PaymentService } from './ui/payment/service/payment.service';
UserLocalNotificationService,
LocalNotifications,
Badge,
- Push,
LifeCycleService,
HmgBrowserService,
GuidService,
@@ -227,7 +226,6 @@ import { PaymentService } from './ui/payment/service/payment.service';
KeyboardService,
Diagnostic,
DevicePermissionsService,
- BarcodeScanner,
LazyLoadingService,
HMGPreloadingStrategy,
HMGPreloadingStrategyLoading,
@@ -237,8 +235,8 @@ import { PaymentService } from './ui/payment/service/payment.service';
RatingService,
InAppBrowser,
RateService,
- PaymentService
-
+ PaymentService,
+ MenuService
]
})
export class HmgCommonModule { }
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 df787404..a98dbf06 100644
--- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts
@@ -1,32 +1,35 @@
-import { Injectable } from '@angular/core';
-import { Request } from '../models/request';
-import { TranslatorService } from '../translator/translator.service';
-import { ConnectorService } from '../connector/connector.service';
-import { Observable, throwError } from 'rxjs';
-import { CheckPatientRegisterationRequest } from './models/check-patient-registeration.request';
-import { LoginRequest } from './models/login.request';
-import { Response } from '../models/response';
-import { AuthenticatedUser } from './models/authenticated-user';
-import { CommonService } from '../common/common.service';
-import { CheckUserAuthenticationRequest } from './models/check-user-auth.request';
-import { CheckActivationCodeRequest } from './models/check-activation-code.request';
-import { CheckUserAuthenticationResponse } from './models/check-user-auth.response';
-import { CheckActivationCodeResponse } from './models/check-activation-code.response';
-import { NativeStorage } from '@ionic-native/native-storage/ngx';
-import { CheckRegisterationCodeRequest } from './models/check-registeration-code.request';
-import { RegisterInformationRequest } from './models/register-information.request';
-import { ForgotFileIDResponse } from './models/forgot-File-ID.response';
-import { EmailRequest } from '../models/email-request';
-import { EmailInput } from '../../ui/email/models/email-input';
-import { UserLocalNotificationService } from '../user-local-notification/user-local-notification.service';
-import { GetLoginInfoRequest } from './models/get-login-info.request';
-import { GetLoginInfoResponse } from './models/get-login-info.response';
-import { analyzeAndValidateNgModules } from '@angular/compiler';
-import { Events } from '@ionic/angular';
-import { InternationalMobileComponent } from '../../ui/mobile-number/international-mobile/international-mobile.component';
+import { Injectable } from "@angular/core";
+import { Request } from "../models/request";
+import { TranslatorService } from "../translator/translator.service";
+import { ConnectorService } from "../connector/connector.service";
+import { Observable, throwError } from "rxjs";
+import { CheckPatientRegisterationRequest } from "./models/check-patient-registeration.request";
+import { LoginRequest } from "./models/login.request";
+import { Response } from "../models/response";
+import { AuthenticatedUser } from "./models/authenticated-user";
+import { CommonService } from "../common/common.service";
+import { CheckUserAuthenticationRequest } from "./models/check-user-auth.request";
+import { CheckActivationCodeRequest } from "./models/check-activation-code.request";
+import { CheckUserAuthenticationResponse } from "./models/check-user-auth.response";
+import { CheckActivationCodeResponse } from "./models/check-activation-code.response";
+import { NativeStorage } from "@ionic-native/native-storage/ngx";
+import { CheckRegisterationCodeRequest } from "./models/check-registeration-code.request";
+import { RegisterInformationRequest } from "./models/register-information.request";
+import { ForgotFileIDResponse } from "./models/forgot-File-ID.response";
+import { EmailRequest } from "../models/email-request";
+import { EmailInput } from "../../ui/email/models/email-input";
+import { UserLocalNotificationService } from "../user-local-notification/user-local-notification.service";
+import { GetLoginInfoRequest } from "./models/get-login-info.request";
+import { GetLoginInfoResponse } from "./models/get-login-info.response";
+import { analyzeAndValidateNgModules } from "@angular/compiler";
+import { Events } from "@ionic/angular";
+import { InternationalMobileComponent } from "../../ui/mobile-number/international-mobile/international-mobile.component";
+import { SMSCheckRequest } from "./models/smscheck.request";
+import { SMSCheckResponse } from "./models/smscheck.response";
+import { ForgetPassword } from 'src/app/authentication/models/forget.password';
@Injectable({
- providedIn: 'root'
+ providedIn: "root"
})
export class AuthenticationService {
@@ -36,9 +39,16 @@ export class AuthenticationService {
/* login methods */
public static loginURL = 'Services/Authentication.svc/REST/CheckPatientAuthentication';
public static checkUserAuthURL = 'Services/Authentication.svc/REST/CheckPatientAuthentication';
+
+ public static login = 'Services/ERP.svc/REST/MemberLogin';
+
public static activationCodeURL = 'Services/Authentication.svc/REST/CheckActivationCode';
public static getLoginInfoURL = 'Services/Authentication.svc/REST/GetMobileLoginInfo';
+ public static smsCheck='Services/ERP.svc/REST/CheckActivationCode';
+ public static smsCheckForget='Services/ERP.svc/REST/CheckPublicActivationCode';
+ public static smsSendCode='Services/ERP.svc/REST/SendPublicActivationCode';
+
/* register methods */
public static checkPatientForRegisterationURL = 'Services/Authentication.svc/REST/CheckPatientForRegisteration';
@@ -49,9 +59,17 @@ export class AuthenticationService {
public static forgotFileIDURL = 'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo';
public static user: AuthenticatedUser;
+ /*user checking methods */
+ public static userChecking = 'Services/ERP.svc/REST/Get_BasicUserInformation';
+ public static changePasswordForget ='Services/ERP.svc/REST/ChangePassword_Forget';
+ public static changePassword ='Services/ERP.svc/REST/ChangePassword_FromActiveSession';
+ public static expiredPassword = 'Services/ERP.svc/REST/ChangePassword_Expired';
+
public static LOGIN_EVENT = 'user-login-event';
public static FAMILY_LOGIN_EVENT = 'family-login-event';
public static AUTHENTICATED_USER_KEY = 'save-authenticated-user';
+ public static LOGIN_DATA="logindata";
+
// private static user: AuthenticatedUser;
constructor(
@@ -68,11 +86,12 @@ export class AuthenticationService {
this.setPublicFields(request);
const user = this.getAuthenticatedUser();
if (user) {
- /*user with eye prescriptions*/
- request.PatientID = user.PatientID;
+ request.P_SESSION_ID = user.P_SESSION_ID;
+ request.MobileNumber = user.EMPLOYEE_MOBILE_NUMBER;
+ request.LogInTokenID = user.LogInTokenID;
request.TokenID = user.TokenID;
- request.PatientOutSA = user.PatientOutSA ? 1 : 0;
- request.PatientTypeID = user.PatientTypeID;
+ request.P_USER_NAME = user.EMPLOYEE_NUMBER;
+ request.UserName = user.EMPLOYEE_NUMBER;
if (AuthenticationService.requireRelogin) {
this.sessionTimeOutDialog();
}
@@ -86,55 +105,70 @@ export class AuthenticationService {
}
}
*/
- return request;
- }
-
- public setPublicFields(request: Request): Request {
- request.VersionID = 3.6;
- request.Channel = 3;
- request.LanguageID = TranslatorService.getCurrentLanguageCode();
- request.IPAdress = '10.10.10.10';
- request.SessionID = 'any thing'; // ??? required for not authorized login funny
- request.isDentalAllowedBackend = false;
- return request;
- }
-
- public authenticateAndSetPersonalInformation(request: EmailRequest, examinationInfo?: any): EmailRequest {
- // if not authenticated will be redirected to login
- this.authenticateRequest(request);
- const user = this.getAuthenticatedUser();
- if (user) {
- request.To = user.Email;
- request.DateofBirth = user.DateofBirth;
- request.PatientIditificationNum = user.PatientIdentificationNo;
- request.PatientMobileNumber = user.MobileNo;
- request.PatientName = user.PatientName;
- request.PatientOutSA = user.PatientOutSA ? 1 : 0;
- request.PatientTypeID = user.PatientTypeID;
-
- if (examinationInfo) {
- if (examinationInfo.SetupID) { request.SetupID = examinationInfo.SetupID; }
- if (examinationInfo.ProjectName) { request.ProjectName = examinationInfo.ProjectName; }
- if (examinationInfo.ClinicName) { request.ClinicName = examinationInfo.ClinicDescription; }
- if (examinationInfo.DoctorName) { request.DoctorName = examinationInfo.DoctorName; }
- if (examinationInfo.ProjectID) { request.ProjectID = examinationInfo.ProjectID; }
- if (examinationInfo.InvoiceNo) { request.InvoiceNo = examinationInfo.InvoiceNo; }
- if (examinationInfo.OrderDate) {
- request.OrderDate = this.cs.getDateISO(this.cs.evaluteDateAsObject(examinationInfo.OrderDate));
- }
- }
-
+ return request;
+ }
+
+ public setPublicFields(request: Request): Request {
+ request.VersionID = 1;
+ request.Channel = 31;
+ request.LanguageID = TranslatorService.getCurrentLanguageCode();
+ //request.IPAdress = '10.10.10.10';
+ //request.SessionID = "any thing"; // ??? required for not authorized login funny
+ request.MobileType = "";
+ //request.isDentalAllowedBackend = false;
+ return request;
+ }
+ public authenticateAndSetPersonalInformation(
+ request: EmailRequest,
+ examinationInfo?: any
+ ): EmailRequest {
+ // if not authenticated will be redirected to login
+ this.authenticateRequest(request);
+ const user = this.getAuthenticatedUser();
+ if (user) {
+ // request.To = user.Email;
+ // request.DateofBirth = user.DateofBirth;
+ // request.PatientIditificationNum = user.PatientIdentificationNo;
+ // request.PatientMobileNumber = user.MobileNo;
+ // request.PatientName = user.PatientName;
+ // request.PatientOutSA = user.PatientOutSA ? 1 : 0;
+ // request.PatientTypeID = user.PatientTypeID;
+
+ if (examinationInfo) {
+ if (examinationInfo.SetupID) {
+ request.SetupID = examinationInfo.SetupID;
}
- return request;
+ if (examinationInfo.ProjectName) {
+ request.ProjectName = examinationInfo.ProjectName;
+ }
+ if (examinationInfo.ClinicName) {
+ request.ClinicName = examinationInfo.ClinicDescription;
+ }
+ if (examinationInfo.DoctorName) {
+ request.DoctorName = examinationInfo.DoctorName;
+ }
+ if (examinationInfo.ProjectID) {
+ request.ProjectID = examinationInfo.ProjectID;
+ }
+ if (examinationInfo.InvoiceNo) {
+ request.InvoiceNo = examinationInfo.InvoiceNo;
+ }
+ if (examinationInfo.OrderDate) {
+ request.OrderDate = this.cs.getDateISO(
+ this.cs.evaluteDateAsObject(examinationInfo.OrderDate)
+ );
+ }
+ }
}
+ return request;
+ }
-
- public getAuthenticatedRequest(login = true): Request {
- const request = new Request();
- this.authenticateRequest(request, login);
- return request;
- }
+ public getAuthenticatedRequest(login = true): Request {
+ const request = new Request();
+ this.authenticateRequest(request, login);
+ return request;
+ }
@@ -146,11 +180,8 @@ export class AuthenticationService {
public login(request: LoginRequest, onError: any, errorLabel: string): Observable {
- request.PatientID = 0;
- request.TokenID = '';
- request.isDentalAllowedBackend = false;
- request.isRegister = false;
- return this.con.post(AuthenticationService.loginURL, request, onError, errorLabel);
+ this.setPublicFields(request);
+ return this.con.post(AuthenticationService.login, request, onError, errorLabel);
}
@@ -158,13 +189,7 @@ export class AuthenticationService {
return AuthenticationService.user != null;
}
- public isAuthenticatedFamilyMember(): boolean {
- if ( AuthenticationService.user != null ) {
- return AuthenticationService.user.familyMember;
- }
- return false;
- }
-
+
/**
* this fucntion load from user information if he logged in before
@@ -176,236 +201,221 @@ export class AuthenticationService {
* 1- user stored in local storage without token
* @param result check activation code result
*/
- public setAuthenticatedUser(result: CheckActivationCodeResponse): Observable {
-
+ public setAuthenticatedUser(
+ result: SMSCheckResponse
+ ): Observable {
return Observable.create(observer => {
- this.loadAuthenticatedUser().subscribe((loadedUser: AuthenticatedUser) => {
- AuthenticationService.requireRelogin = false;
- this.startIdleMonitoring();
- const user = this.updateAuthenticatedUser(result, loadedUser);
- /* we store in hd without token but with token in memory*/
- this.saveUserInStorage(user).subscribe((success: boolean) => {
- AuthenticationService.user = user;
- this.publishUserChangeEvent();
- observer.next(true);
- observer.complete();
- });
- });
- });
-
- }
-
- public resetAuthenticatedUser(user: AuthenticatedUser ) {
- AuthenticationService.user = user;
- AuthenticationService.requireRelogin = false;
- this.startIdleMonitoring();
- this.publishUserChangeEvent();
-
- }
-
- public setAuthenticatedMemberFamilyUser(result: CheckActivationCodeResponse) {
-
- const authUser = new AuthenticatedUser();
- AuthenticationService.requireRelogin = false;
- this.startIdleMonitoring();
- const user = this.updateAuthenticatedUser(result, authUser);
- user["familyMember"] = true;
- user.familyMember = true;
- // user["hello"]= "ok";
- /* we store in hd without token but with token in memory*/
- AuthenticationService.user = user;
- this.publishFamilyMemeberUserChangeEvent();
-
- }
-
-
- public updateLoggedInUser(newUser: AuthenticatedUser): Observable {
- return Observable.create(observer => {
- /* we store in hd without token but with token in memory*/
- this.saveUserInStorage(newUser).subscribe((success: boolean) => {
- AuthenticationService.requireRelogin = false;
- AuthenticationService.user = newUser;
+ this.loadAuthenticatedUser().subscribe(
+ (loadedUser: AuthenticatedUser) => {
+ AuthenticationService.requireRelogin = false;
+ this.startIdleMonitoring();
+ const user = this.updateAuthenticatedUser(result, loadedUser);
+ /* we store in hd without token but with token in memory*/
+ this.saveUserInStorage(user).subscribe((success: boolean) => {
+ AuthenticationService.user = user;
+
this.publishUserChangeEvent();
- observer.next(success);
+ observer.next(true);
observer.complete();
- });
-
- });
-
- }
-
- public setDeviceToken(token: string) {
- const user = this.getAuthenticatedUser();
- if (user) {
- user.deviceToken = token;
- this.updateLoggedInUser(user).subscribe((success: boolean) => {
- // console.log('token stored:' + token);
- });
- }
- }
-
- public registerTempUser(request: RegisterInformationRequest, onError: any, errorLabel: string)
- : Observable {
- this.setPublicFields(request);
- request.TokenID = '';
- return this.con.post(AuthenticationService.registerTempUserURL, request, onError, errorLabel);
- }
-
- public getLoginInfo(request: GetLoginInfoRequest, onError: any, errorLabel: string)
- : Observable {
- this.setPublicFields(request);
- return this.con.post(AuthenticationService.getLoginInfoURL, request, onError, errorLabel);
- }
-
-
- /**
- *update new authenticated user from previously stored and loaded user
- */
- private updateAuthenticatedUser(result: CheckActivationCodeResponse, loadedUser: AuthenticatedUser): AuthenticatedUser {
- const user = result.List[0];
- if (loadedUser) {
- // only if same user we fetch previous settings
- if (loadedUser.PatientID === user.PatientID) {
- user.agreed = loadedUser.agreed;
- user.biometricEnabled = loadedUser.biometricEnabled;
- } else {
- this.localNotifications.deleteAllNotifications();
+ });
}
- }
- if (user.FirstName && user.LastName) {
- user.PatientName = user.FirstName + ' ' + user.LastName;
- }
- user.IdentificationNo = user.PatientIdentificationNo;
- /*
- since suliman al habib has no support now for international phone number we do this woraround
- */
- if (user.PatientOutSA) {
- user.ZipCode = InternationalMobileComponent.EMIRATE_DIAL_CODE;
- } else {
- user.ZipCode = InternationalMobileComponent.SAUDI_DIAL_CODE;
- }
- user.Email = this.isRealEmail(user.EmailAddress) ? user.EmailAddress : null;
-
- user.MobileNumber = user.MobileNumber.substr(1, user.MobileNumber.length - 1);
- user.MobileNo = user.MobileNumber;
- user.PatientOutSA = result.PatientOutSA;
- user.PatientTypeID = result.PatientType;
- user.TokenID = result.AuthenticationTokenID;
- return user;
- }
-
- public isRealEmail(email: string): boolean {
- return EmailInput.isValidEmail(email);
- }
-
- public isAuthenticatedUserHasRealEmail(): boolean {
- const user = this.getAuthenticatedUser();
- return user ? this.isRealEmail(user.Email) : false;
- }
-
- public setUserAgreed(agreed: boolean) {
- const user = this.getAuthenticatedUser();
- if (user) {
- user.agreed = agreed;
- // user['agreed'] = agreed;
- this.saveUserInStorage(user).subscribe(result => {
- });
- } else {
-
- }
- }
-
- public isAgreedBefore(): boolean {
- const user = this.getAuthenticatedUser();
- if (user) {
- return (user.agreed != null) ? user.agreed : false;
- } else {
- return false;
- }
- }
- /**
- * we store in localstorage without token but we keep it in the static member
- */
- private saveUserInStorage(user: AuthenticatedUser): Observable {
-
- return Observable.create(observer => {
- if (user) {
- const TokenID = user.TokenID;
- user.TokenID = null;
- this.nativeStorage.setItem(AuthenticationService.AUTHENTICATED_USER_KEY, user)
- .then(
- () => {
- user.TokenID = TokenID;
- observer.next(true);
- observer.complete();
- },
- error => {
- user.TokenID = TokenID;
-
- observer.next(false);
- observer.complete();
- }
- );
- } else {
- observer.next(false);
- observer.complete();
- }
-
- });
-
- }
-
- /**
- * signout
- *clear user session and storage information
- */
- public clearUser(): Observable {
- this.clearUserSession();
- return Observable.create(observer => {
- this.publishUserChangeEvent();
- this.nativeStorage.remove(AuthenticationService.AUTHENTICATED_USER_KEY).then(
- () => {
- observer.next(true);
- observer.complete();
- },
- () => {
- observer.next(false);
- observer.complete();
- });
+ );
});
- }
-
- private publishUserChangeEvent() {
- this.events.publish(AuthenticationService.LOGIN_EVENT, this.getAuthenticatedUser(), Date.now());
- }
-
- private publishFamilyMemeberUserChangeEvent() {
- this.events.publish(AuthenticationService.FAMILY_LOGIN_EVENT, this.getAuthenticatedUser(), Date.now());
- }
-
- public clearUserSession() {
- AuthenticationService.user = null;
- }
-
- public loadAuthenticatedUser(): Observable {
- return Observable.create(observer => {
-
- this.nativeStorage.getItem(AuthenticationService.AUTHENTICATED_USER_KEY)
- .then(
- (user) => {
- observer.next(user);
- observer.complete();
- },
- error => {
- observer.next(null);
- observer.complete();
- }
- );
- });
- }
- // TODO you should read from local storage and update static member
- public getAuthenticatedUser(): AuthenticatedUser {
- /*
+ }
+
+
+ public resetAuthenticatedUser(user: AuthenticatedUser) {
+ AuthenticationService.user = user;
+ AuthenticationService.requireRelogin = false;
+ this.startIdleMonitoring();
+ this.publishUserChangeEvent();
+ }
+
+ // public setAuthenticatedMemberFamilyUser(result: CheckActivationCodeResponse) {
+ // const authUser = new AuthenticatedUser();
+ // AuthenticationService.requireRelogin = false;
+ // this.startIdleMonitoring();
+ // const user = this.updateAuthenticatedUser(result, authUser);
+
+ // // user["hello"]= "ok";
+ // /* we store in hd without token but with token in memory*/
+ // AuthenticationService.user = user;
+ // this.publishFamilyMemeberUserChangeEvent();
+ // }
+
+ public updateLoggedInUser(newUser: AuthenticatedUser): Observable {
+ return Observable.create(observer => {
+ /* we store in hd without token but with token in memory*/
+ this.saveUserInStorage(newUser).subscribe((success: boolean) => {
+ AuthenticationService.requireRelogin = false;
+ AuthenticationService.user = newUser;
+ this.publishUserChangeEvent();
+ observer.next(success);
+ observer.complete();
+ });
+ });
+ }
+ public setDeviceToken(token: string) {
+ const user = this.getAuthenticatedUser();
+ if (user) {
+ // user.deviceToken = token;
+ this.updateLoggedInUser(user).subscribe((success: boolean) => {
+ // console.log('token stored:' + token);
+ });
+ }
+ }
+
+ public registerTempUser(
+ request: RegisterInformationRequest,
+ onError: any,
+ errorLabel: string
+ ): Observable {
+ this.setPublicFields(request);
+ request.TokenID = "";
+ return this.con.post(
+ AuthenticationService.registerTempUserURL,
+ request,
+ onError,
+ errorLabel
+ );
+ }
+
+ public getLoginInfo(
+ request: GetLoginInfoRequest,
+ onError: any,
+ errorLabel: string
+ ): Observable {
+ this.setPublicFields(request);
+ return this.con.post(
+ AuthenticationService.getLoginInfoURL,
+ request,
+ onError,
+ errorLabel
+ );
+ }
+
+ /**
+ *update new authenticated user from previously stored and loaded user
+ */
+ private updateAuthenticatedUser(
+ result: SMSCheckResponse,
+ loadedUser: AuthenticatedUser
+ ): AuthenticatedUser {
+ const user = result.MemberInformationList[0];
+ user.P_SESSION_ID = result.P_SESSION_ID;
+ user.MobileNumber = result.EMPLOYEE_MOBILE_NUMBER;
+ user.TokenID = result.TokenID;
+ user.CompanyImageDescription=result.CompanyImageDescription;
+ user.CompanyImageURL=result.CompanyImageURL;
+ user.LogInTokenID = this.cs.sharedService.getSharedData(
+ AuthenticationService.LOGIN_DATA
+ ).LogInTokenID;
+ return user;
+ }
+
+ public isRealEmail(email: string): boolean {
+ return EmailInput.isValidEmail(email);
+ }
+
+ public isAuthenticatedUserHasRealEmail(): boolean {
+ const user = this.getAuthenticatedUser();
+ return user ? this.isRealEmail(user.EMPLOYEE_EMAIL_ADDRESS) : false;
+ }
+
+ /**
+ * we store in localstorage without token but we keep it in the static member
+ */
+ private saveUserInStorage(user: AuthenticatedUser): Observable {
+ return Observable.create(observer => {
+ if (user) {
+ // const TokenID = user.TokenID;
+ // user.TokenID = null;
+ this.nativeStorage
+ .setItem(AuthenticationService.AUTHENTICATED_USER_KEY, user)
+ .then(
+ () => {
+ //user.TokenID = TokenID;
+ observer.next(true);
+ observer.complete();
+ },
+ error => {
+ // user.TokenID = TokenID;
+
+ observer.next(false);
+ observer.complete();
+ }
+ );
+ } else {
+ observer.next(false);
+ observer.complete();
+ }
+ });
+ }
+ /**
+ * signout
+ *clear user session and storage information
+ */
+ public clearUser(): Observable {
+ this.clearUserSession();
+ return Observable.create(observer => {
+ this.publishUserChangeEvent();
+ this.nativeStorage
+ .remove(AuthenticationService.AUTHENTICATED_USER_KEY)
+ .then(
+ () => {
+ observer.next(true);
+ observer.complete();
+ },
+ () => {
+ observer.next(false);
+ observer.complete();
+ }
+ );
+ });
+ }
+
+ private publishUserChangeEvent() {
+ this.events.publish(
+ AuthenticationService.LOGIN_EVENT,
+ this.getAuthenticatedUser(),
+ Date.now()
+ );
+ }
+
+ private publishFamilyMemeberUserChangeEvent() {
+ this.events.publish(
+ AuthenticationService.FAMILY_LOGIN_EVENT,
+ this.getAuthenticatedUser(),
+ Date.now()
+ );
+ }
+
+ public clearUserSession() {
+ AuthenticationService.user = null;
+ }
+
+ public loadAuthenticatedUser(): Observable {
+ return Observable.create(observer => {
+ this.nativeStorage
+ .getItem(AuthenticationService.AUTHENTICATED_USER_KEY)
+ .then(
+ user => {
+ observer.next(user);
+ observer.complete();
+ },
+ error => {
+ // this.getAuthenticatedUser()
+ //commented for now will uncomment when we are going to deploy on the device;
+ //observer.next(null);
+ observer.next(this.getAuthenticatedUser());
+ observer.complete();
+ }
+ );
+ });
+ }
+ // TODO you should read from local storage and update static member
+ public getAuthenticatedUser(): AuthenticatedUser {
+ /*
if (AuthenticationService.requireRelogin) {
this.sessionTimeOutDialog();
return new AuthenticatedUser();
@@ -413,14 +423,18 @@ export class AuthenticationService {
return AuthenticationService.user;
}
*/
+ if(AuthenticationService.user){
return AuthenticationService.user;
+ }else{
+ this.cs.openLogin();
+ }
}
public checkUserAuthentication(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string)
: Observable {
this.setPublicFields(request);
- return this.con.post(AuthenticationService.checkUserAuthURL, request, onError, errorLabel);
+ return this.con.post(AuthenticationService.userChecking, request, onError, errorLabel);
}
public checkActivationCode(request: CheckActivationCodeRequest, onError: any, errorLabel: string)
@@ -429,19 +443,30 @@ export class AuthenticationService {
return this.con.post(AuthenticationService.activationCodeURL, request, onError, errorLabel);
}
+ public checkSMS(request: SMSCheckRequest, onError: any, errorLabel: string)
+ : Observable {
+ this.setPublicFields(request);
+ return this.con.post(AuthenticationService.smsCheck, request, onError, errorLabel);
+ }
+
+ public checkForgetSMS(request: SMSCheckRequest, onError: any, errorLabel: string)
+ : Observable {
+ this.setPublicFields(request);
+ return this.con.post(AuthenticationService.smsCheckForget, request, onError, errorLabel);
+ }
+
+ public sendPublicSMS(request: SMSCheckRequest, onError: any, errorLabel: string)
+ : Observable {
+ this.setPublicFields(request);
+ return this.con.post(AuthenticationService.smsSendCode, request, onError, errorLabel);
+ }
+
/*
client side:
id no , mobile no , zip code
*/
- public checkPatientForRegisteration(request: CheckPatientRegisterationRequest, onError: any, errorLabel: string)
- : Observable {
- this.setPublicFields(request);
- request.TokenID = '';
- request.PatientID = 0;
- request.isRegister = false;
- return this.con.post(AuthenticationService.checkPatientForRegisterationURL, request, onError, errorLabel);
- }
- /*
+
+ /*
client side:
id no , mobile no , zip code
*/
@@ -449,7 +474,6 @@ export class AuthenticationService {
: Observable {
this.setPublicFields(request);
request.TokenID = '';
- request.PatientID = 0;
request.isRegister = false;
return this.con.post(AuthenticationService.sendSmsForRegisterURL, request, onError, errorLabel);
}
@@ -460,14 +484,38 @@ export class AuthenticationService {
return this.con.post(AuthenticationService.activationCodeURL, request, onError, errorLabel);
}
+ public sendForgetPassword(request: ForgetPassword, onError: any, errorLabel: string)
+ : Observable {
+ this.setPublicFields(request);
+ return this.con.post(AuthenticationService.smsSendCode, request, onError, errorLabel);
+ }
+
+ public submitForgetPassword(request: ForgetPassword, onError: any, errorLabel: string)
+ : Observable {
+ this.setPublicFields(request);
+ return this.con.post(AuthenticationService.changePasswordForget, request, onError, errorLabel);
+ }
+
+ public submitChangePassword(request: ForgetPassword, onError: any, errorLabel: string)
+ : Observable {
+ this.setPublicFields(request);
+ this.authenticateRequest(request);
+ return this.con.post(AuthenticationService.changePassword, request, onError, errorLabel);
+ }
+
+ public submitExpiredPassword(request: ForgetPassword, onError: any, errorLabel: string)
+ : Observable {
+ this.setPublicFields(request);
+ return this.con.post(AuthenticationService.expiredPassword, request, onError, errorLabel);
+ }
+
+
public sendSMSForForgotFileNumber(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string)
: Observable {
this.setPublicFields(request);
request.TokenID = '';
- request.PatientIdentificationID = '';
- request.PatientID = 0;
- request.SearchType = 2;
- request.isRegister = false;
+ //request.SearchType = 2;
+ //request.isRegister = false;
return this.con.post(AuthenticationService.sendSMSForgotFileNoURL, request, onError, errorLabel);
}
@@ -475,140 +523,135 @@ export class AuthenticationService {
: Observable {
this.setPublicFields(request);
request.TokenID = '';
- request.PatientIdentificationID = '';
- request.PatientID = 0;
request.SearchType = 2;
request.isRegister = false;
return this.con.post(AuthenticationService.forgotFileIDURL, request, onError, errorLabel);
}
-
public isSAUDIIDValid(id: string): boolean {
if (!id) {
- return false;
+ return false;
}
try {
- id = id.toString();
- id = id.trim();
- const returnValue = Number(id);
- let sum = 0;
- if (returnValue > 0) {
- const type = Number(id.charAt(0));
-
- if (id.length !== 10) {
- return false;
- }
- if (type !== 2 && type !== 1) {
- return false;
- }
-
- for (let i = 0; i < 10; i++) {
- if ((i % 2) === 0) {
- const a = id.charAt(i);
- const x = Number(a) * 2;
- let b = x.toString();
- if (b.length === 1) {
- b = '0' + b;
- }
- sum += Number(b.charAt(0)) + Number(b.charAt(1));
-
- } else {
- sum += Number(id.charAt(i));
- }
+ id = id.toString();
+ id = id.trim();
+ const returnValue = Number(id);
+ let sum = 0;
+ if (returnValue > 0) {
+ const type = Number(id.charAt(0));
+
+ if (id.length !== 10) {
+ return false;
+ }
+ if (type !== 2 && type !== 1) {
+ return false;
+ }
+
+ for (let i = 0; i < 10; i++) {
+ if (i % 2 === 0) {
+ const a = id.charAt(i);
+ const x = Number(a) * 2;
+ let b = x.toString();
+ if (b.length === 1) {
+ b = "0" + b;
}
- return ((sum % 10) === 0);
+ sum += Number(b.charAt(0)) + Number(b.charAt(1));
+ } else {
+ sum += Number(id.charAt(i));
+ }
}
- } catch (err) {
-
- }
+ return sum % 10 === 0;
+ }
+ } catch (err) {}
return false;
- }
-
-
- public checkUserHasEmailDialog(): Observable {
-
- return Observable.create(observer => {
- if (this.isAuthenticatedUserHasRealEmail()) {
- const message = this.ts.trPK('general', 'send-email')
- .replace('[0]', this.getAuthenticatedUser().EmailAddress || this.getAuthenticatedUser().Email);
- this.cs.presentConfirmDialog(message,
- () => {
- observer.next();
- observer.complete();
- });
- } else {
- this.cs.presentConfirmDialog(this.ts.trPK('login', 'enter-email'),
- () => {
- //this.cs.openPatientProfile();
- observer.complete();
- });
- }
+ }
+
+ public checkUserHasEmailDialog(): Observable {
+ return Observable.create(observer => {
+ if (this.isAuthenticatedUserHasRealEmail()) {
+ const message = this.ts
+ .trPK("general", "send-email")
+ .replace("[0]", this.getAuthenticatedUser().EmailAddress);
+ this.cs.presentConfirmDialog(message, () => {
+ observer.next();
+ observer.complete();
});
-
- }
-
- /*
+ } else {
+ this.cs.presentConfirmDialog(
+ this.ts.trPK("login", "enter-email"),
+ () => {
+ //this.cs.openPatientProfile();
+ observer.complete();
+ }
+ );
+ }
+ });
+ }
+
+ /*
user session timeout after idle for 20 Minute
*/
- private static requireRelogin = false;
- public static monitorInterval_M = 20 * 60 * 1000;
- // public static monitorInterval_M = 15 * 1000;
- private static timerID;
-
- private stopIdleTimer() {
- if (AuthenticationService.timerID) {
- clearTimeout(AuthenticationService.timerID);
- }
- }
-
- private sessionTimeOutDialog() {
- this.cs.presentConfirmDialog(this.ts.trPK('general', 'idle-relogin'), () => {
- // this.cs.openUserLogin();
- });
- }
-
- /*
+ private static requireRelogin = false;
+ public static monitorInterval_M = 20 * 60 * 1000;
+ // public static monitorInterval_M = 15 * 1000;
+ private static timerID;
+
+ private stopIdleTimer() {
+ if (AuthenticationService.timerID) {
+ clearTimeout(AuthenticationService.timerID);
+ }
+ }
+
+ private sessionTimeOutDialog() {
+ this.cs.presentConfirmDialog(
+ this.ts.trPK("general", "idle-relogin"),
+ () => {
+ // this.cs.openUserLogin();
+ }
+ );
+ }
+
+ /*
reset and start idling interval
*/
- private detectIdle() {
- this.stopIdleTimer();
- AuthenticationService.timerID = setTimeout(() => {
- if (AuthenticationService.user) {
- AuthenticationService.requireRelogin = true;
- this.clearUserSession();
- this.publishUserChangeEvent();
- this.sessionTimeOutDialog();
- this.cs.openHome();
- }
- }, AuthenticationService.monitorInterval_M);
- }
-
- private registerDocumentEvents(events: string[], handler: any) {
- for (const event of events) {
- document.addEventListener(event, handler);
- }
- }
-
- private static eventsRegistered = false;
- public startIdleMonitoring() {
- if (!AuthenticationService.eventsRegistered) {
- AuthenticationService.eventsRegistered = true;
- // every time we have and event
- this.registerDocumentEvents(['mousedown', 'touchstart', 'click', 'keyup'], () => {
- // if user still logged in and session not expired
- if (AuthenticationService.user && !AuthenticationService.requireRelogin) {
- // reset and start idling timer
- this.detectIdle();
- }
- });
+ private detectIdle() {
+ this.stopIdleTimer();
+ AuthenticationService.timerID = setTimeout(() => {
+ if (AuthenticationService.user) {
+ AuthenticationService.requireRelogin = true;
+ this.clearUserSession();
+ this.publishUserChangeEvent();
+ this.sessionTimeOutDialog();
+ this.cs.openHome();
+ }
+ }, AuthenticationService.monitorInterval_M);
+ }
+
+ private registerDocumentEvents(events: string[], handler: any) {
+ for (const event of events) {
+ document.addEventListener(event, handler);
+ }
+ }
+
+ private static eventsRegistered = false;
+ public startIdleMonitoring() {
+ if (!AuthenticationService.eventsRegistered) {
+ AuthenticationService.eventsRegistered = true;
+ // every time we have and event
+ this.registerDocumentEvents(
+ ["mousedown", "touchstart", "click", "keyup"],
+ () => {
+ // if user still logged in and session not expired
+ if (
+ AuthenticationService.user &&
+ !AuthenticationService.requireRelogin
+ ) {
+ // reset and start idling timer
+ this.detectIdle();
+ }
}
-
+ );
}
-
-
-
-
+ }
}
-
-
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts b/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts
index 8c17a3e4..fd842744 100644
--- a/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts
@@ -2,16 +2,79 @@ import { PatientUserModel } from './PatientUserModel';
import { TestBed } from '@angular/core/testing';
export class AuthenticatedUser extends PatientUserModel {
- PatientName: string;
- TokenID: string;
- MobileNo: string;
- Email: string;
- PatientOutSA: boolean;
- PatientTypeID: number;
- agreed: boolean;
- IdentificationNo: string;
- deviceToken: string;
- biometricEnabled: boolean;
- ProjectID: number;
- familyMember: boolean;
+ TokenID:string;
+ACTUAL_TERMINATION_DATE: string;
+ASSIGNMENT_END_DATE: string;
+ASSIGNMENT_ID: number;
+ASSIGNMENT_NUMBER: string;
+ASSIGNMENT_START_DATE: string;
+ASSIGNMENT_STATUS_TYPE_ID: number;
+ASSIGNMENT_TYPE: string;
+BUSINESS_GROUP_ID: number;
+BUSINESS_GROUP_NAME: string;
+CURRENT_EMPLOYEE_FLAG: string;
+EMPLOYEE_DISPLAY_NAME: string;
+EMPLOYEE_EMAIL_ADDRESS:string;
+EMPLOYEE_IMAGE:string;
+EMPLOYEE_MOBILE_NUMBER: string;
+EMPLOYEE_NAME:string;
+EMPLOYEE_NUMBER: string;
+EMPLOYEE_WORK_NUMBER:string;
+EMPLOYMENT_CATEGORY: string;
+EMPLOYMENT_CATEGORY_MEANING: string;
+FREQUENCY: string;
+FREQUENCY_MEANING: string;
+FROM_ROW_NUM: number;
+GRADE_ID: number;
+GRADE_NAME: string;
+HIRE_DATE: string;
+JOB_ID: number;
+JOB_NAME: string;
+LEDGER_ID: number;
+LOCATION_ID: number;
+LOCATION_NAME: string;
+MANUAL_TIMECARD_FLAG: string;
+MANUAL_TIMECARD_MEANING: string;
+NATIONALITY_CODE: string;
+NATIONALITY_MEANING: string;
+NATIONAL_IDENTIFIER:string;
+NORMAL_HOURS: string;
+NO_OF_ROWS: number;
+ORGANIZATION_ID: number;
+ORGANIZATION_NAME: string;
+PAYROLL_CODE: string;
+PAYROLL_ID: number;
+PAYROLL_NAME: string;
+PERSON_ID: number;
+PERSON_TYPE:string;
+PERSON_TYPE_ID: number;
+PER_INFORMATION_CATEGORY: string;
+POSITION_ID: number;
+POSITION_NAME: string;
+PRIMARY_FLAG: string;
+ROW_NUM:number;
+SUPERVISOR_ASSIGNMENT_ID: string;
+SUPERVISOR_DISPLAY_NAME: string;
+SUPERVISOR_EMAIL_ADDRESS: string;
+SUPERVISOR_ID: number;
+SUPERVISOR_MOBILE_NUMBER: string;
+SUPERVISOR_NAME: string;
+SUPERVISOR_NUMBER: string;
+SUPERVISOR_WORK_NUMBER: string;
+SWIPES_EXEMPTED_FLAG: string;
+SWIPES_EXEMPTED_MEANING: string;
+SYSTEM_PERSON_TYPE: string;
+TK_EMAIL_ADDRESS: string;
+TK_EMPLOYEE_DISPLAY_NAME: string;
+TK_EMPLOYEE_NAME: string;
+TK_EMPLOYEE_NUMBER: string;
+TK_PERSON_ID: number;
+TO_ROW_NUM: number;
+UNIT_NUMBER: string;
+USER_STATUS: string;
+P_SESSION_ID:number;
+MobileNumber:string;
+LogInTokenID:string;
+CompanyImageDescription: string
+CompanyImageURL: string
}
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/basic.info.ts b/Mohem/src/app/hmg-common/services/authentication/models/basic.info.ts
new file mode 100644
index 00000000..fc4a19a1
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/authentication/models/basic.info.ts
@@ -0,0 +1,7 @@
+
+export class BasicInfo extends Request{
+ public P_EMAIL_ADDRESS:string;
+ public P_MOBILE_NUMBER: string;
+ public P_RETURN_MSG: string;
+ public P_RETURN_STATUS: string;
+}
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/check-activation-code.response.ts b/Mohem/src/app/hmg-common/services/authentication/models/check-activation-code.response.ts
index 2ce565f3..a1518041 100644
--- a/Mohem/src/app/hmg-common/services/authentication/models/check-activation-code.response.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/models/check-activation-code.response.ts
@@ -3,8 +3,15 @@ import { PatientUserModel } from './PatientUserModel';
import { AuthenticatedUser } from './authenticated-user';
export class CheckActivationCodeResponse extends Response {
- List: AuthenticatedUser[];
AuthenticationTokenID: string;
- PatientOutSA: boolean;
- PatientType: number;
+ P_SESSION_ID:number;
+ MobileNumber:string;
+ LogInTokenID:string;
+ EMPLOYEE_MOBILE_NUMBER:string;
+ TokenID:string;
+ CompanyImageDescription:string;
+ CompanyImageURL: string;
+
+ MemberInformationList:AuthenticatedUser[];
+
}
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/check-user-auth.request.ts b/Mohem/src/app/hmg-common/services/authentication/models/check-user-auth.request.ts
index 5121f239..45314c6f 100644
--- a/Mohem/src/app/hmg-common/services/authentication/models/check-user-auth.request.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/models/check-user-auth.request.ts
@@ -1,10 +1,14 @@
import { Request } from '../../models/request';
export class CheckUserAuthenticationRequest extends Request {
- PatientIdentificationID: string; // id
- PatientMobileNumber: string; // phone number
- ZipCode: string;
- SearchType: number; // 1 for id , 2 for file no
- isRegister: boolean; // false
- LogInTokenID?: string;
+ // PatientIdentificationID: string; // id
+ // PatientMobileNumber: string; // phone number
+ // ZipCode: string;
+ // SearchType: number; // 1 for id , 2 for file no
+ // isRegister: boolean; // false
+ // LogInTokenID?: string;
+
+ P_USER_NAME:string;
+ P_LANGUAGE: string;
+ P_PASSWORD: string;
}
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/check-user-auth.response.ts b/Mohem/src/app/hmg-common/services/authentication/models/check-user-auth.response.ts
index e7e942f0..cc33d22d 100644
--- a/Mohem/src/app/hmg-common/services/authentication/models/check-user-auth.response.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/models/check-user-auth.response.ts
@@ -1,4 +1,6 @@
import { Response } from '../../models/response';
+import { BasicInfo } from './basic.info';
+import { MemberList } from './member.list';
export class CheckUserAuthenticationResponse extends Response {
PatientHasFile: boolean;
@@ -10,4 +12,12 @@ export class CheckUserAuthenticationResponse extends Response {
hasFile: boolean;
isSMSSent: boolean;
LogInTokenID: string;
+ P_EMAIL_ADDRESS : string;
+ P_MOBILE_NUMBER : string;
+ P_RETURN_MSG : string;
+ P_RETURN_STATUS : string;
+ public IsPasswordExpired: boolean;
+ //public P_SESSION_ID:string;
+ public MemberLoginList: MemberList ;
+ public BasicMemberInformation: BasicInfo;
}
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/get-login-info.request.ts b/Mohem/src/app/hmg-common/services/authentication/models/get-login-info.request.ts
index a7ec111c..1668bf9e 100644
--- a/Mohem/src/app/hmg-common/services/authentication/models/get-login-info.request.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/models/get-login-info.request.ts
@@ -16,11 +16,11 @@ export class GetLoginInfoRequest extends Request {
isRegister: boolean; // false
constructor(user: AuthenticatedUser) {
super();
- this.NationalID = user.IdentificationNo;
- this.MobileNo = this.PatientMobileNumber = user.MobileNo;
- this.DeviceToken = user.deviceToken;
- this.PatientID = user.PatientID;
- this.ProjectOutSA = user.PatientOutSA ;
+ // this.NationalID = user.IdentificationNo;
+ // this.MobileNo = this.PatientMobileNumber = user.MobileNo;
+ // this.DeviceToken = user.deviceToken;
+ // this.PatientID = user.PatientID;
+ // this.ProjectOutSA = user.PatientOutSA ;
this.LoginType = 2;
this.ZipCode = CountryCode.localCode( user.ZipCode);
this.SearchType = 2;
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/login.request.ts b/Mohem/src/app/hmg-common/services/authentication/models/login.request.ts
index 5d6b3511..cb1cdbf5 100644
--- a/Mohem/src/app/hmg-common/services/authentication/models/login.request.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/models/login.request.ts
@@ -7,6 +7,11 @@ export class LoginRequest extends Request {
SearchType: number; // 1 for iqama 2 for file number
TokenID: string; // ""
ZipCode: string; // "966"
+ MobileNumber: string;
+ P_USER_NAME : string;
+ P_MOBILE_NUMBER : string;
+ P_PASSWORD : string;
+ P_LANGUAGE : string;
// isDentalAllowedBackend: false
isRegister: boolean; // false
}
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/member.list.ts b/Mohem/src/app/hmg-common/services/authentication/models/member.list.ts
new file mode 100644
index 00000000..e74b563f
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/authentication/models/member.list.ts
@@ -0,0 +1,9 @@
+export class MemberList {
+ public P_EMAIL_ADDRESS:string;
+ public P_INVALID_LOGIN_MSG: string;
+ public P_MOBILE_NUMBER: string;
+ public P_PASSOWRD_EXPIRED: string;
+ public P_RETURN_MSG: string;
+ public P_RETURN_STATUS: string;
+ public P_SESSION_ID: number;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/smscheck.request.ts b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.request.ts
new file mode 100644
index 00000000..4f9f153b
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.request.ts
@@ -0,0 +1,6 @@
+import { Request } from '../../models/request';
+
+export class SMSCheckRequest extends Request {
+ LogInTokenID: string ;
+ activationCode?: string;
+}
\ No newline at end of file
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
new file mode 100644
index 00000000..70fc4dba
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts
@@ -0,0 +1,17 @@
+import { Response } from '../../models/response';
+import { AuthenticatedUser } from './authenticated-user';
+export class SMSCheckResponse extends Response {
+ AuthenticationTokenID: string;
+ MemberInformationList:AuthenticatedUser[];
+ public TokenID: string;
+ public SessionID: string;
+ public MobileType: string;
+ public BookedBy?: number;
+ public P_SESSION_ID: number;
+ public MobileNumber : string;
+ public LogInTokenID : string;
+ public CompanyImageDescription:string;
+ public CompanyImageURL:string;
+ public EMPLOYEE_MOBILE_NUMBER:string;
+
+}
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 2a54f10e..37e1a9ac 100644
--- a/Mohem/src/app/hmg-common/services/common/common.service.ts
+++ b/Mohem/src/app/hmg-common/services/common/common.service.ts
@@ -120,6 +120,21 @@ export class CommonService {
}
}
+
+ getSecondsAsDigitalClock(inputSeconds: number) {
+ var sec_num = parseInt(inputSeconds.toString(), 10); // don't forget the second param
+ var hours = Math.floor(sec_num / 3600);
+ var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
+ var seconds = sec_num - (hours * 3600) - (minutes * 60);
+ var hoursString = '';
+ var minutesString = '';
+ var secondsString = '';
+ hoursString = (hours < 10) ? "0" + hours : hours.toString();
+ minutesString = (minutes < 10) ? "0" + minutes : minutes.toString();
+ secondsString = (seconds < 10) ? "0" + seconds : seconds.toString();
+ return minutesString + ':' + secondsString;
+ }
+
public toastPK(page: string, key: string) {
this.toast(this.ts.trPK(page, key));
}
@@ -233,7 +248,7 @@ export class CommonService {
public userNeedToReLogin() {
this.presentConfirmDialog(this.ts.trPK("general", "relogin"), () => {
- //this.openUserLogin();
+ this.openLogin();
});
}
@@ -255,6 +270,26 @@ export class CommonService {
);
}
+ async JustAlertDialog(acceptLabel: string,
+ message: string)
+ {
+ this.clearAllAlerts();
+ const alert = await this.alertControllerIonic.create({
+ header: this.ts.trPK("general", "info"),
+ message: message,
+ buttons: [
+ {
+ text: acceptLabel,
+ handler: () => {
+ this.alertControllerIonic.dismiss();
+ }
+ }
+ ]
+ });
+ // this.alerts.push(alert);
+ await alert.present();
+ }
+
async confirmAlertDialog(
onAccept: any,
acceptLabel: string,
@@ -851,12 +886,21 @@ export class CommonService {
open calls
*/
-
- public static HOME_URL = ["/home", "/home-page"];
public openHome() {
- this.alternateNavigate(CommonService.HOME_URL, "home-open", true);
+ this.nav.navigateRoot(["/home"]);
+ }
+ public openForgotPassword() {
+ this.nav.navigateForward(["/authentication/forgot"]);
+ }
+ public openChangePassword() {
+ this.nav.navigateForward(["/authentication/changepassowrd"]);
+ }
+ public openProfile() {
+ this.nav.navigateForward(["/profile/home"]);
+ }
+ public openAccuralPage() {
+ this.nav.navigateForward(["/accrual-balances/home"]);
}
-
public reload(url: string, from: string) {
console.log("force reload called from:" + from);
// window.location.reload();
@@ -895,9 +939,15 @@ export class CommonService {
}
}
+ public openLogin() {
+ this.nav.navigateRoot(["/authentication/login"]);
+ }
public openUserForgot() {
- this.nav.navigateForward(["/authentication/forgot"]);
+ this.nav.navigateForward(["/authentication/checkuser"]);
+ }
+ public openSMSPage() {
+ this.nav.navigateForward(["/authentication/smspage"]);
}
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 2cb40649..4e0c6ddd 100644
--- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts
+++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts
@@ -120,8 +120,9 @@ export class ConnectorService {
this.cs.stopLoading();
if (!this.cs.validResponse(result)) {
// not authorized
+ console.log(result.MessageStatus);
if (result.ErrorType === 2) {
- // this.cs.userNeedToReLogin();
+ //console.log("error expired");
} else {
this.cs.showErrorMessageDialog(onError, errorLabel, result.ErrorEndUserMessage);
}
diff --git a/Mohem/src/app/hmg-common/services/geofencing/geofencing.service.ts b/Mohem/src/app/hmg-common/services/geofencing/geofencing.service.ts
index ec86cfb1..954e9ad3 100644
--- a/Mohem/src/app/hmg-common/services/geofencing/geofencing.service.ts
+++ b/Mohem/src/app/hmg-common/services/geofencing/geofencing.service.ts
@@ -54,8 +54,8 @@ export class GeofencingService {
const req = new InsertLocationRequest();
req.PointsID = id;
req.GeoType = type;
- req.PatientID = userData.PatientID;
- req.PatientOutSA = userData.PatientOutSA;
+ //req.PatientID = userData.PatientID;
+ //req.PatientOutSA = userData.PatientOutSA;
this.auth.setPublicFields(req);
this.con.postNoLoad(GeofencingService.loggingUrl, req, () => {
zone.pendingRequest = type; // failed to log, setup pending request
@@ -395,9 +395,9 @@ export class GeofencingService {
const user = this.authService.getAuthenticatedUser();
this.turnTrackingOff();
this.cs.presentConfirmDialog(this.ts.trPK('settings', 'enable-geo'), () => {
- this.turnTrackingOn(user.PatientID, +user.PatientOutSA);
+ // this.turnTrackingOn(user.PatientID, +user.PatientOutSA);
}, () => {
- this.turnTrackingOn(user.PatientID, +user.PatientOutSA);
+ // this.turnTrackingOn(user.PatientID, +user.PatientOutSA);
this.turnTrackingOff();
});
}
diff --git a/Mohem/src/app/hmg-common/services/menu/menuservice.service.spec.ts b/Mohem/src/app/hmg-common/services/menu/menuservice.service.spec.ts
new file mode 100644
index 00000000..f80116c5
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/menu/menuservice.service.spec.ts
@@ -0,0 +1,12 @@
+import { TestBed } from '@angular/core/testing';
+
+import { MenuserviceService } from './menuservice.service';
+
+describe('MenuserviceService', () => {
+ beforeEach(() => TestBed.configureTestingModule({}));
+
+ it('should be created', () => {
+ const service: MenuserviceService = TestBed.get(MenuserviceService);
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/hmg-common/services/menu/menuservice.service.ts b/Mohem/src/app/hmg-common/services/menu/menuservice.service.ts
new file mode 100644
index 00000000..2b49d10e
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/menu/menuservice.service.ts
@@ -0,0 +1,50 @@
+import {Injectable} from '@angular/core';
+import {Http, Response, Headers, } from "@angular/http";
+import {AuthenticationService} from "../authentication/authentication.service";
+import { Observable } from 'rxjs';
+import {MenuEntries} from './models/menu-entries.request';
+import {Request} from '../models/request';
+import {MenuResponse} from './models/menu-response'
+import { ConnectorService } from '../connector/connector.service';
+@Injectable()
+export class MenuService {
+ public static getMenu ='Services/ERP.svc/REST/GET_MENU';
+ public static getMenuEntries = 'Services/ERP.svc/REST/GET_MENU_ENTRIES';
+ public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES';
+ public static getNotCount='Services/ERP.svc/REST/GET_OPEN_NOTIFICATIONS_NUM';
+ public static disableSession="Services/ERP.svc/REST/DisableSession";
+ public static detectLanguage='Services/ERP.svc/REST/Get_LanguageAvailable';
+ constructor(
+ public authService: AuthenticationService,
+ public con:ConnectorService
+
+ ) { }
+
+ public getMenu(onError?: any, errorLabel?: string): Observable {
+ const request = new Request();
+ this.authService.authenticateRequest(request);
+ return this.con.post(MenuService.getMenu, request, onError, errorLabel);
+ }
+ public getMenuEntires(menuEntries:any, onError?: any, errorLabel?: string): Observable {
+ const request = menuEntries;
+ this.authService.authenticateRequest(request);
+ return this.con.post(MenuService.getMenuEntries, request, onError, errorLabel);
+ }
+ public getNotificationCount(req:any, onError?: any, errorLabel?: string): Observable {
+ const request = req;
+ this.authService.authenticateRequest(request);
+ return this.con.post(MenuService.getNotCount, request, onError, errorLabel);
+ }
+
+ public disableSession(req:any, onError?: any, errorLabel?: string): Observable {
+ const request = req;
+ this.authService.authenticateRequest(request);
+ return this.con.post(MenuService.disableSession, request, onError, errorLabel);
+ }
+
+ public getAppLanguages(req:any, onError?: any, errorLabel?: string): Observable {
+ const request = req;
+ this.authService.authenticateRequest(request);
+ return this.con.post(MenuService.detectLanguage, request, onError, errorLabel);
+ }
+}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/services/menu/models/list.menu.ts b/Mohem/src/app/hmg-common/services/menu/models/list.menu.ts
new file mode 100644
index 00000000..80c37768
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/menu/models/list.menu.ts
@@ -0,0 +1,7 @@
+export class ListMenu {
+public MENU_ID:number;
+public MENU_NAME:string;
+public MENU_TYPE:string;
+public RESP_ID:number;
+public SUB_MENU_NAME:string;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/services/menu/models/menu-entries.request.ts b/Mohem/src/app/hmg-common/services/menu/models/menu-entries.request.ts
new file mode 100644
index 00000000..69a71f55
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/menu/models/menu-entries.request.ts
@@ -0,0 +1,6 @@
+import { Request } from '../models/request';
+export class MenuEntries extends Request {
+ public P_MENU_TYPE:string;
+ public P_SELECTED_EMPLOYEE_NUMBER:string;
+ public P_SELECTED_RESP_ID:number
+}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/services/menu/models/menu-response.ts b/Mohem/src/app/hmg-common/services/menu/models/menu-response.ts
new file mode 100644
index 00000000..85e91a8c
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/menu/models/menu-response.ts
@@ -0,0 +1,9 @@
+import { ListMenu } from './list.menu';
+import { MenuEntry } from './menu.entry';
+export class MenuResponse {
+ public static SHARED_DATA = 'menu_response';
+ public static SHARED_SEL_EMP= 'sel_empolyee';
+ public static SHARED_SEL_RESP_ID= 'sel_resp_id';
+ public List_Menu:ListMenu;
+ public GetMenuEntriesList:MenuEntry;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/services/menu/models/menu.entry.ts b/Mohem/src/app/hmg-common/services/menu/models/menu.entry.ts
new file mode 100644
index 00000000..7a52d8c6
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/menu/models/menu.entry.ts
@@ -0,0 +1,13 @@
+export class MenuEntry {
+ public MENU_NAME:string;
+ public ADD_BUTTON:string;
+ public DELETE_BUTTON:string;
+ public UPDATE_BUTTON:string;
+ public ENTRY_SEQUENCE:number;
+ public FUNCTION_NAME:string;
+ public LVL:number;
+ public MENU_ENTRY_TYPE:string;
+ public PARENT_MENU_NAME:string;
+ public PROMPT:string;
+ public REQUEST_TYPE:string;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/services/menu/models/request.ts b/Mohem/src/app/hmg-common/services/menu/models/request.ts
new file mode 100644
index 00000000..8cf1c27f
--- /dev/null
+++ b/Mohem/src/app/hmg-common/services/menu/models/request.ts
@@ -0,0 +1,18 @@
+export class Request {
+ public P_USER_NAME: string;
+ public LanguageID: number;
+ //public IPAdress: string;
+ public P_SESSION_ID: number;
+ public VersionID: number;
+ public Channel: number;
+ public P_PASSWORD: string;
+ public P_MOBILE_NUMBER: string;
+ public P_EMAIL_ADDRESS: string;
+ public TokenID:string;
+ public P_NOTIFICATION_ID:number;
+ public MobileNumber: string;
+ public UserName:string;
+ public LogInTokenID:string;
+ public MobileType:string;
+
+}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/services/models/request.ts b/Mohem/src/app/hmg-common/services/models/request.ts
index d88b96f0..6da4a70d 100644
--- a/Mohem/src/app/hmg-common/services/models/request.ts
+++ b/Mohem/src/app/hmg-common/services/models/request.ts
@@ -1,18 +1,16 @@
export class Request {
- public ClinicID: number;
- public PatientOutSA: number;
- public PatientID: number;
- public ProjectID: number;
public LanguageID: number;
public IPAdress: string;
public VersionID: number;
public Channel: number;
- public PatientTypeID: number;
public isDentalAllowedBackend: boolean;
public IsIrisPrescription: boolean;
public TokenID: string;
- public SessionID: string;
- public PatientIdentificationID: string;
- public PatientMobileNumber: string;
+ public MobileType: string;
public BookedBy?: number;
+ public P_SESSION_ID: number;
+ public MobileNumber : string;
+ public LogInTokenID : string;
+ public P_USER_NAME:string;
+ public UserName:string;
}
diff --git a/Mohem/src/app/hmg-common/services/push/push.service.ts b/Mohem/src/app/hmg-common/services/push/push.service.ts
index 0e91f5ec..48be6ccb 100644
--- a/Mohem/src/app/hmg-common/services/push/push.service.ts
+++ b/Mohem/src/app/hmg-common/services/push/push.service.ts
@@ -1,5 +1,5 @@
import { Injectable, NgZone } from '@angular/core';
-import { Push, PushObject, PushOptions } from '@ionic-native/push/ngx';
+// import { Push, PushObject, PushOptions } from '@ionic-native/push/ngx';
import { CommonService } from '../common/common.service';
import { TranslatorService } from '../translator/translator.service';
import { NotificationModel } from './models/notification.model';
@@ -26,7 +26,7 @@ export class PushService {
public static CHANNEL_ID = '815750722565';
constructor(
- public push: Push,
+ // public push: Push,
public cs: CommonService,
public ts: TranslatorService,
public sharedService: SharedDataService,
@@ -43,58 +43,58 @@ export class PushService {
this.processStartReceiving();
}
private processStartReceiving() {
- if (this.cs.isCordova()) {
- this.stopNotifications(() => {
- this.push.hasPermission()
- .then((res: any) => {
- if (res.isEnabled) {
- this.createChannel();
- } else {
- this.cs.presentAlert(this.ts.trPK('push', 'no-permiss'));
- }
- });
- });
- }
+ // if (this.cs.isCordova()) {
+ // this.stopNotifications(() => {
+ // this.push.hasPermission()
+ // .then((res: any) => {
+ // if (res.isEnabled) {
+ // this.createChannel();
+ // } else {
+ // this.cs.presentAlert(this.ts.trPK('push', 'no-permiss'));
+ // }
+ // });
+ // });
+ // }
}
private createChannel() {
// Create a channel (Android O and above). You'll need to provide the id, description and importance properties.
- this.push.createChannel({
- id: PushService.CHANNEL_ID,
- description: 'HMG push notifications',
- importance: 3
- }).then(() => {
- this.initialize();
- });
+ // this.push.createChannel({
+ // id: PushService.CHANNEL_ID,
+ // description: 'HMG push notifications',
+ // importance: 3
+ // }).then(() => {
+ // this.initialize();
+ // });
}
private initialize() {
- const options: PushOptions = {
- android: {
- senderID: PushService.CHANNEL_ID,
- sound: true,
- forceShow: true
- },
- ios: {
- alert: true,
- badge: true,
- sound: true
- },
- windows: {},
- browser: {
- pushServiceURL: 'http://push.api.phonegap.com/v1/push'
- }
- };
- const pushObject: PushObject = this.push.init(options);
- pushObject.on('notification').subscribe((notification: any) => {
- this.processNotification(notification);
- });
+ // const options: PushOptions = {
+ // android: {
+ // senderID: PushService.CHANNEL_ID,
+ // sound: true,
+ // forceShow: true
+ // },
+ // ios: {
+ // alert: true,
+ // badge: true,
+ // sound: true
+ // },
+ // windows: {},
+ // browser: {
+ // pushServiceURL: 'http://push.api.phonegap.com/v1/push'
+ // }
+ // };
+ // const pushObject: PushObject = this.push.init(options);
+ // pushObject.on('notification').subscribe((notification: any) => {
+ // this.processNotification(notification);
+ // });
- pushObject.on('registration').subscribe((data: any) => {
- this.registerInBackend(data);
- });
+ // pushObject.on('registration').subscribe((data: any) => {
+ // this.registerInBackend(data);
+ // });
- pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
+ // pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
}
@@ -149,11 +149,11 @@ export class PushService {
}
public stopNotifications(done: any) {
// Delete a channel (Android O and above)
- if (this.cs.isCordova()) {
- this.push.deleteChannel(PushService.CHANNEL_ID).then(() => {
- done();
- });
- }
+ // if (this.cs.isCordova()) {
+ // this.push.deleteChannel(PushService.CHANNEL_ID).then(() => {
+ // done();
+ // });
+ // }
}
private registerInBackend(data: any) {
@@ -171,12 +171,12 @@ export class PushService {
request.DeviceToken = deviceToken;
request.DeviceType = this.getDeviceType();
const user = this.authService.getAuthenticatedUser();
- request.PatientMobileNumber = user.MobileNo;
- request.NationalID = user.IdentificationNo;
+ // request.PatientMobileNumber = user.MobileNo;
+ //request.NationalID = user.IdentificationNo;
request.Gender = user.Gender;
request.PatientID = user.PatientID;
- request.PatientOutSA = user.PatientOutSA ? 1 : 0;
- request.LoginType = user.biometricEnabled ? 2 : 1; // 1 sms , 2 touch id
+ // request.PatientOutSA = user.PatientOutSA ? 1 : 0;
+ //request.LoginType = user.biometricEnabled ? 2 : 1; // 1 sms , 2 touch id
request.MACAddress = '00:00:00:00:00:00';
return this.con.postNoLoad(PushService.loggedInUserURL, request
, () => { }).subscribe((result: Response) => {
diff --git a/Mohem/src/app/hmg-common/services/translator/translator.service.ts b/Mohem/src/app/hmg-common/services/translator/translator.service.ts
index ae9559b3..00870278 100644
--- a/Mohem/src/app/hmg-common/services/translator/translator.service.ts
+++ b/Mohem/src/app/hmg-common/services/translator/translator.service.ts
@@ -14,7 +14,7 @@ export class TranslatorService {
public static EN = 'en';
public static EN_US = 'en-us';
public static AR = 'ar';
- public static CURRENT_LANGUAGE = TranslatorService.AR;
+ public static CURRENT_LANGUAGE = TranslatorService.EN;
public static CHANGE_EVENT = 'language-changed-event';
private static translations: any;
constructor(
@@ -174,7 +174,7 @@ export class TranslatorService {
}
private setCurrentLanguageToDefault() {
- TranslatorService.CURRENT_LANGUAGE = TranslatorService.AR;
+ TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
}
public setCurrentLanguage(language: string) {
TranslatorService.CURRENT_LANGUAGE = language;
diff --git a/Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.html b/Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.html
index 2b618a0e..bfedc08a 100644
--- a/Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.html
+++ b/Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.html
@@ -11,7 +11,7 @@
-->
-
+
diff --git a/Mohem/src/app/hmg-common/ui/payment/service/payment.service.ts b/Mohem/src/app/hmg-common/ui/payment/service/payment.service.ts
index d97cebb4..2f6a9abf 100644
--- a/Mohem/src/app/hmg-common/ui/payment/service/payment.service.ts
+++ b/Mohem/src/app/hmg-common/ui/payment/service/payment.service.ts
@@ -73,9 +73,9 @@ export class PaymentService {
private generateURL(amount: number, orderDesc: string, transactionID: string): string {
let form = this.getForm();
const user = this.authService.getAuthenticatedUser();
- if (user) {
- form = form.replace('EMAIL_VALUE', user.Email || user.EmailAddress);
- }
+ // if (user) {
+ // form = form.replace('EMAIL_VALUE', user.Email || user.EmailAddress);
+ // }
form = form.replace('AMOUNT_VALUE', (amount || 0).toString());
form = form.replace('ORDER_DESCRIPTION_VALUE', orderDesc);
form = form.replace('SESSION_ID_VALUE', transactionID);
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/app/hmg-common/ui/sms/sms.page.html b/Mohem/src/app/hmg-common/ui/sms/sms.page.html
index ac32038f..c49cc795 100644
--- a/Mohem/src/app/hmg-common/ui/sms/sms.page.html
+++ b/Mohem/src/app/hmg-common/ui/sms/sms.page.html
@@ -1,51 +1,36 @@
-
- {{'sms,title' | translate}}
-
+
+ {{'verificationcode.verificationcode' | translate}}
+
-
-
-
-
-
-
-
-
-
- {{ 'home,verification-code-text'| translate}}
-
-
- {{mobile}}
-
-
-
-
- {{ 'h2o,verification_message' | translate}}
-
-
-
-
-
-
- {{ 'h2o,validation_message' | translate}}
-
-
- {{displayTime}}
-
+
+
+
+
+
+
-
-
- {{'h2o,code_failure' | translate}}
-
-
- {{'h2o,resend' | translate}}
-
-
-
-
- {{'general,submit' | translate}}
-
+
+
+ {{'verificationcode.title' | translate}}{{'verificationcode.verificationcode' | translate}} {{'verificationcode.by' | translate}}{{'verificationcode.sms' | translate}}{{'verificationcode.instruct' | translate}}{{'general.submit' | translate}}
+
-
-
\ No newline at end of file
+
+
+
+
+
{{displayTime}}
+
+
+ {{'verificationcode.verificationcode' | translate}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/ui/tabs-bar/tabs-bar.component.ts b/Mohem/src/app/hmg-common/ui/tabs-bar/tabs-bar.component.ts
index 9df182f7..e33c0bce 100644
--- a/Mohem/src/app/hmg-common/ui/tabs-bar/tabs-bar.component.ts
+++ b/Mohem/src/app/hmg-common/ui/tabs-bar/tabs-bar.component.ts
@@ -124,11 +124,11 @@ export class TabsBarComponent implements OnInit {
*/
private monitUrlChange() {
this.router.events.subscribe((val) => {
- if (val instanceof NavigationEnd) {
- if (this.matchesURL(val, CommonService.HOME_URL, TabsBarComponent.home)) {
- this.cs.openHome();
- }
- }
+ // if (val instanceof NavigationEnd) {
+ // if (this.matchesURL(val, CommonService.HOME_URL, TabsBarComponent.home)) {
+ // this.cs.openHome();
+ // }
+ // }
});
}
diff --git a/Mohem/src/app/home/home.module.ts b/Mohem/src/app/home/home.module.ts
new file mode 100644
index 00000000..603eccc5
--- /dev/null
+++ b/Mohem/src/app/home/home.module.ts
@@ -0,0 +1,28 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { Routes, RouterModule } from '@angular/router';
+import { HmgCommonModule } from '../hmg-common/hmg-common.module';
+import { IonicModule } from '@ionic/angular';
+import { HomePage } from './home.page';
+
+const routes: Routes = [
+ {
+ path: '',
+ component: HomePage,
+ }
+];
+
+@NgModule({
+ imports: [
+ CommonModule,
+ FormsModule,
+ IonicModule,
+ HmgCommonModule,
+ RouterModule.forChild(routes)
+ ],
+ declarations: [
+ HomePage
+ ]
+})
+export class HomePageModule { }
diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html
new file mode 100644
index 00000000..4751ae33
--- /dev/null
+++ b/Mohem/src/app/home/home.page.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Mohem/src/app/home/home.page.scss b/Mohem/src/app/home/home.page.scss
new file mode 100644
index 00000000..018f5f17
--- /dev/null
+++ b/Mohem/src/app/home/home.page.scss
@@ -0,0 +1,93 @@
+.button-menutoggle.button-menutoggle-md,button-menutoggle.button-menutoggle-ios,
+.bar-buttons.bar-buttons-ios.button.button-ios.button-default.button-default-ios.button-menutoggle.button-menutoggle-ios{
+ box-shadow: none;
+ -webkit-box-shadow:none;
+ -moz-box-shadow: none;
+ background: transparent !important;
+ }
+ .menubutton{
+ white-space: normal;
+ color: var(--light);
+ text-transform: capitalize;
+ min-height: 47px;
+ background: transparent;
+ font-size: 2rem;
+ }
+ #homeBadgeBtn{
+ position: absolute;
+ top: 2px;
+ width: 20px;
+ font-size: 10px;
+ height: 20px;
+ padding: 0px;
+ line-height: 2;
+ min-width: auto;
+ min-height: auto;
+ }
+ .header-div{
+ background:var(--primary);
+ background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
+ background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
+ background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
+ color:var(--light);
+ text-transform: capitalize;
+
+ display: block;
+ position: relative;
+ height: 120px;
+ margin-bottom:60px;
+ }
+
+ .dash-header{
+ text-align: center;
+ margin: 16px 0 0 0;
+
+ }
+
+ .TxtPlace {
+ margin: 0;
+ padding: 0 0 10px 0;
+ text-align: center;
+ }
+
+ .serviceItem {
+ min-height: 160px !important;
+ padding: 0;
+ width:100%;
+ border: 2px solid #e4e5e7;
+ background: transparent !important;
+ color: var(--dark);
+ p{
+ margin-top: 0px; margin-bottom:0px;
+ font-weight: normal;
+ font-size: 14px;
+ min-height: 20px;
+ // white-space: normal;
+ text-align: center;
+ -webkit-line-clamp: 3;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ }
+ span {
+ display: block;
+
+ }
+ .serviceItemImg {
+ min-width: 60px !important;
+ min-height: 70px !important;
+ width: 80px;
+ height: 80px;
+ margin: 10px auto;
+ background: transparent !important;
+ }
+
+ }
+ .serviceItem.button,.serviceItem.button-md, .serviceItem.button-ios{
+ background: transparent !important;
+ color:var(--dark);
+ box-shadow: none;
+ -webkit-box-shadow:none;
+ -moz-box-shadow: none;
+ border: 2px solid var(--gray);
+ min-width: auto;
+ }
\ No newline at end of file
diff --git a/Mohem/src/app/home/home.page.spec.ts b/Mohem/src/app/home/home.page.spec.ts
new file mode 100644
index 00000000..cfa74c8f
--- /dev/null
+++ b/Mohem/src/app/home/home.page.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HomePage } from './home.page';
+
+describe('HomePage', () => {
+ let component: HomePage;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ HomePage ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(HomePage);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts
new file mode 100644
index 00000000..f7ea5249
--- /dev/null
+++ b/Mohem/src/app/home/home.page.ts
@@ -0,0 +1,71 @@
+import { Component, OnInit } from "@angular/core";
+import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
+import { MenuController,Events } from "@ionic/angular";
+import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
+import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
+import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
+import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
+import { CommonService } from "src/app/hmg-common/services/common/common.service";
+
+@Component({
+ selector: "app-home",
+ templateUrl: "./home.page.html",
+ styleUrls: ["./home.page.scss"]
+})
+export class HomePage implements OnInit {
+ userData: any = {};
+ user_image: any = "../assets/imgs/profile.png";
+ menuList: any = [];
+ constructor(
+ public ts: TranslatorService,
+ public menu: MenuController,
+ public authService: AuthenticationService,
+ public menuService: MenuService,
+ public common: CommonService,
+ public events:Events
+ ) {}
+
+ ngOnInit() {
+ this.getUserDetails();
+ this.getMenu();
+ }
+ private openMenu() {
+ this.menu.toggle();
+ }
+ private getUserDetails() {
+ this.authService
+ .loadAuthenticatedUser()
+ .subscribe((user: AuthenticatedUser) => {
+ if (user) {
+ this.events.publish('setMenu');
+ this.userData = user;
+ this.user_image = user.EMPLOYEE_IMAGE ? "data:image/png;base64,"+user.EMPLOYEE_IMAGE : this.user_image;
+ console.log(user);
+ } else {
+ console.log(user);
+ }
+ });
+ }
+ public Vacation_Rule() {
+ this.common.navigateForward('/vacation-rule/home');
+ }
+ private getMenu() {
+ this.menuService.getMenu().subscribe((result: MenuResponse) => {
+ this.handleMenuResult(result);
+ });
+ }
+ private handleMenuResult(result) {
+ if (this.common.validResponse(result)) {
+ if (this.common.hasData(result.List_Menu)) {
+ this.menuList = result.List_Menu;
+ }
+ }
+ }
+ private accrualBalance(){
+ this.common.openAccuralPage();
+ }
+
+ private Change_password(){
+ this.common.openChangePassword();
+ }
+}
diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html
new file mode 100644
index 00000000..d88cac28
--- /dev/null
+++ b/Mohem/src/app/profile/home/home.component.html
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+ {{personalInfo.EMPLOYEE_NAME}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/profile/home/home.component.scss b/Mohem/src/app/profile/home/home.component.scss
new file mode 100644
index 00000000..60b11dbc
--- /dev/null
+++ b/Mohem/src/app/profile/home/home.component.scss
@@ -0,0 +1,3 @@
+ion-col.colBold, ion-col.colBold > label{
+ font-weight:bold;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/profile/home/home.component.spec.ts b/Mohem/src/app/profile/home/home.component.spec.ts
new file mode 100644
index 00000000..5ec1377b
--- /dev/null
+++ b/Mohem/src/app/profile/home/home.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HomeComponent } from './home.component';
+
+describe('HomeComponent', () => {
+ let component: HomeComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ HomeComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(HomeComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts
new file mode 100644
index 00000000..f5e10adf
--- /dev/null
+++ b/Mohem/src/app/profile/home/home.component.ts
@@ -0,0 +1,38 @@
+import { Component, OnInit } from "@angular/core";
+import { CommonService } from "src/app/hmg-common/services/common/common.service";
+import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
+import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
+import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
+@Component({
+ selector: "app-home",
+ templateUrl: "./home.component.html",
+ styleUrls: ["./home.component.scss"]
+})
+export class HomeComponent implements OnInit {
+ personalInfo: any;
+ imageSrc: string = "../assets/imgs/profile.png";
+ constructor(
+ public ts: TranslatorService,
+ public cs: CommonService,
+ public authService: AuthenticationService
+ ) {}
+
+ ngOnInit() {
+ this.getProfile();
+ }
+ getProfile() {
+ this.authService
+ .loadAuthenticatedUser()
+ .subscribe((user: AuthenticatedUser) => {
+ if (user) {
+ this.personalInfo = user;
+ this.imageSrc = user.EMPLOYEE_IMAGE
+ ? "data:image/png;base64," + user.EMPLOYEE_IMAGE
+ : this.imageSrc;
+ console.log(user);
+ } else {
+ console.log(user);
+ }
+ });
+ }
+}
diff --git a/Mohem/src/app/profile/profile.module.ts b/Mohem/src/app/profile/profile.module.ts
new file mode 100644
index 00000000..6688ce80
--- /dev/null
+++ b/Mohem/src/app/profile/profile.module.ts
@@ -0,0 +1,32 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { Routes, RouterModule } from '@angular/router';
+
+import { IonicModule } from '@ionic/angular';
+
+import { ProfilePage } from './profile.page';
+import { HomeComponent } from './home/home.component';
+const routes: Routes = [
+ {
+ path: '',
+ component: ProfilePage,
+ children: [
+ {
+ path: 'home',
+ component: HomeComponent
+ }
+ ],
+ }
+];
+
+@NgModule({
+ imports: [
+ CommonModule,
+ FormsModule,
+ IonicModule,
+ RouterModule.forChild(routes)
+ ],
+ declarations: [ProfilePage , HomeComponent]
+})
+export class ProfilePageModule {}
diff --git a/Mohem/src/app/profile/profile.page.html b/Mohem/src/app/profile/profile.page.html
new file mode 100644
index 00000000..e020ca2c
--- /dev/null
+++ b/Mohem/src/app/profile/profile.page.html
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/profile/profile.page.scss b/Mohem/src/app/profile/profile.page.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/Mohem/src/app/profile/profile.page.spec.ts b/Mohem/src/app/profile/profile.page.spec.ts
new file mode 100644
index 00000000..6f05c1ab
--- /dev/null
+++ b/Mohem/src/app/profile/profile.page.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ProfilePage } from './profile.page';
+
+describe('ProfilePage', () => {
+ let component: ProfilePage;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ ProfilePage ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ProfilePage);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/profile/profile.page.ts b/Mohem/src/app/profile/profile.page.ts
new file mode 100644
index 00000000..e24f8f60
--- /dev/null
+++ b/Mohem/src/app/profile/profile.page.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-profile',
+ templateUrl: './profile.page.html',
+ styleUrls: ['./profile.page.scss'],
+})
+export class ProfilePage implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.html b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.html
new file mode 100644
index 00000000..e1cf75d5
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+ - {{'vacation-rule, itemType' | translate}}
+
+
+
+
+ - {{'vacation-rule, notification-type' | translate}}
+
+
+
+
+ - {{'vacation-rule, create-vacation-rule' | translate}}
+
+
+
+
+
+
+
+ {{'vacation-rule, itemType' | translate}}
+ {{P_ITEM_TYPE_TITLE}}
+
+
+ {{'vacation-rule, notification' | translate}}
+ {{Notification_Title}}
+
+
+ {{'vacation-rule, start-date' | translate}}
+
+
+
+ {{'vacation-rule, end-date' | translate}}
+
+
+
+ {{'vacation-rule, message-label' | translate}}
+
+
+
+
+
+ {{assignMode.RADIO_BUTTON_LABEL}}
+
+
+
+ {{'createVacationRule.deliver' | translate}}
+
+
+
+
+ {{'createVacationRule.close' | translate}}
+
+
+
+
+
+ {{'createVacationRule.respond' | translate}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.scss b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.scss
new file mode 100644
index 00000000..ea1b58d3
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.scss
@@ -0,0 +1,14 @@
+li {
+ width: 100%;
+}
+
+.label {
+ white-space: normal;
+ font-size: smaller;
+}
+
+ion-list,
+ion-item {
+ width: 100%;
+ margin-right: 7%;
+}
diff --git a/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.spec.ts b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.spec.ts
new file mode 100644
index 00000000..5f278530
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CreateVacationRuleComponent } from './create-vacation-rule.component';
+
+describe('CreateVacationRuleComponent', () => {
+ let component: CreateVacationRuleComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CreateVacationRuleComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CreateVacationRuleComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.ts b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.ts
new file mode 100644
index 00000000..c0cf23d8
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.ts
@@ -0,0 +1,107 @@
+import { Component, OnInit } from '@angular/core';
+import * as moment from 'moment';
+import { VacationRuleServiceService } from '../service/vacation-rule-service.service';
+import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
+
+@Component({
+ selector: 'app-create-vacation-rule',
+ templateUrl: './create-vacation-rule.component.html',
+ styleUrls: ['./create-vacation-rule.component.scss'],
+})
+export class CreateVacationRuleComponent implements OnInit {
+
+ P_RESPOND_ATTRIBUTES_TBL: any;
+ P_ITEM_TYPE_TITLE: any = "";
+ Notification_Title: any = "";
+ isDeliver: boolean = false;
+ showForType_Y: boolean = false;
+ Resp2_val: any;
+ Sdate: any;
+ // startTime: any;
+ //endTime: any;
+ Edate: any;
+ msgVal: any;
+ selEmployeeName: any;
+ selEmployeeID: any;
+ employeeSel: any;
+ replacmentEmployeeInfo: any;
+ itemType: any;
+ notificationType: any;
+ RespondAttributeList: any;
+ // vacationRuleRequest: createVacationRequest;
+ REASSIGN_val: any;
+ schemaNotific: any;
+ notifTypeSel: any;
+ // pAction: any;
+ isUpdate: boolean = false;
+ updateData: any;
+ forwordAtt: any = "";
+ SelAction: string = "";
+ hideForwordEmployee: any;
+ exampleJsonObject: any;
+
+ constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
+ this.Sdate = moment().format('YYYY-MM-DDTHH:mm:ssZ');
+ }
+
+ ngOnInit() {
+ this.getNotificationReassign();
+ }
+
+ getNotificationReassign() {
+ let request: LoginRequest = new LoginRequest();
+
+ this.vacationRuleService.notificationReassign(request, () => {
+ this.getNotificationReassign();
+ }, this.ts.trPK('general', 'retry')).subscribe((result) => {
+ console.log(result);
+ if (this.cs.validResponse(result)) {
+ console.log(result.GetNotificationReassignModeList);
+ this.REASSIGN_val = result.GetNotificationReassignModeList;//[0].RADIO_BUTTON_ACTION;
+ this.notifTypeSel = this.REASSIGN_val[0].RADIO_BUTTON_ACTION;
+ this.reverseAction();
+ } else {
+ this.cs.presentAlert(result.ErrorEndUserMessage);
+ }
+ });
+ }
+
+ reverseAction() {
+ if (this.updateData) {
+ switch (this.SelAction) {
+ case 'FORWARD': {
+ this.notifTypeSel = "DELEGATE";
+ break;
+ }
+ case 'RESPOND': {
+ this.notifTypeSel = "RESPOND";
+ break;
+ }
+ case 'CLOSE': {
+ this.notifTypeSel = "CLOSE";
+ break;
+ }
+ case 'NOOP': {
+ this.notifTypeSel = "DELIVER";
+ break;
+ }
+ case 'TRANSFER': {
+ this.notifTypeSel = "TRANSFER";
+ break;
+ }
+ default: {
+ this.notifTypeSel = "";
+ break;
+ }
+ }
+ }
+ }
+
+ respondAttributes() {
+
+ }
+
+
+}
diff --git a/Mohem/src/app/vacation-rule/home/home.component.html b/Mohem/src/app/vacation-rule/home/home.component.html
new file mode 100644
index 00000000..f9c2e08e
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/home/home.component.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{'vacation-rule, ruleInfo' | translate}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/vacation-rule/home/home.component.scss b/Mohem/src/app/vacation-rule/home/home.component.scss
new file mode 100644
index 00000000..af66a677
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/home/home.component.scss
@@ -0,0 +1,71 @@
+.item-md p,
+.item-md ios {
+ white-space: normal;
+}
+.col {
+ white-space: normal;
+ font-size: 14px;
+}
+ion-col.colBold {
+ color: #1a586d;
+}
+.imgSize {
+ width: 22px;
+ height: 22px;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+ion-card-header {
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.header-toolbar {
+ --background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
+}
+
+.btnBack {
+ background: transparent;
+ float: right;
+}
+
+.footer-button {
+ border-radius: 2px;
+ padding: 0 1.1em;
+ min-height: 45px;
+ min-width: 200px;
+}
+
+ion-card-header {
+ padding: 0px 10px !important;
+ color: #ffffff !important;
+ -webkit-border-top-left-radius: 10px;
+ -webkit-border-top-right-radius: 10px;
+ -moz-border-radius-topleft: 10px;
+ -moz-border-radius-topright: 10px;
+ border-top-left-radius: 10px;
+ border-top-right-radius: 10px;
+ background: #acacac;
+ .hrTitle {
+ white-space: normal;
+ padding: 5px;
+ padding-top: 12px;
+ width: 100%;
+ min-height: 45px;
+ line-height: 1.2;
+ }
+ .button,
+ .button-md,
+ button-ios {
+ background: transparent;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ min-width: auto;
+ padding: 0px !important;
+ margin: 0px 5px !important;
+ }
+}
diff --git a/Mohem/src/app/vacation-rule/home/home.component.spec.ts b/Mohem/src/app/vacation-rule/home/home.component.spec.ts
new file mode 100644
index 00000000..5ec1377b
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/home/home.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HomeComponent } from './home.component';
+
+describe('HomeComponent', () => {
+ let component: HomeComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ HomeComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(HomeComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/vacation-rule/home/home.component.ts b/Mohem/src/app/vacation-rule/home/home.component.ts
new file mode 100644
index 00000000..3e6f204a
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/home/home.component.ts
@@ -0,0 +1,156 @@
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+import { VacationRuleServiceService } from './../service/vacation-rule-service.service';
+import { VacationRuleRequest } from './../model/VacationRuleRequest';
+import { Component, OnInit } from '@angular/core';
+import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+
+@Component({
+ selector: 'app-home',
+ templateUrl: './home.component.html',
+ styleUrls: ['./home.component.scss'],
+})
+export class HomeComponent implements OnInit {
+
+ userName: any;
+ P_PAGE_NUM: number;
+ P_PAGE_LIMIT: number;
+ GetVacationRulesList: any = [];
+ isUpdate: boolean = false;
+ IsReachEnd: boolean = false;
+ RespondAttributeList: any;
+
+
+ constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
+ this.P_PAGE_NUM = 1;
+ this.P_PAGE_LIMIT = 50;
+
+ this.GetVacationRulesList = [
+ {
+ "ACTION": "FORWARD",
+ "ACTION_DISPLAY": "Forward",
+ "BEGIN_DATE": "6/26/2019 2:50:14 PM",
+ "END_DATE": "6/30/2019 2:50:22 PM",
+ "FROM_ROW_NUM": 1,
+ "FYI_FLAG": "Y",
+ "ITEM_TYPE": "HRSSA",
+ "ITEM_TYPE_DISPLAY_NAME": "HR",
+ "MESSAGE": "TEst Rule",
+ "NOTIFICATION_DISPLAY_NAME": "",
+ "NOTIFICATION_NAME": "*",
+ "NOTIFICATION_SUBJECT": "",
+ "NO_OF_ROWS": 1,
+ "REPLACEMENT_USER_NAME": "70915",
+ "ROW_NUM": 1,
+ "RULE_ID": 7770756,
+ "RULE_NAME": "Delegate: Al Oulah, Mohammed",
+ "RULE_STATUS": "Active",
+ "RULE_TIP_MESSAGE": "",
+ "TO_ROW_NUM": 1
+ },
+ {
+ "ACTION": "FORWARD",
+ "ACTION_DISPLAY": "Forward",
+ "BEGIN_DATE": "6/26/2019 2:50:14 PM",
+ "END_DATE": "6/30/2019 2:50:22 PM",
+ "FROM_ROW_NUM": 1,
+ "FYI_FLAG": "Y",
+ "ITEM_TYPE": "HRSSA",
+ "ITEM_TYPE_DISPLAY_NAME": "HR",
+ "MESSAGE": "TEst Rule",
+ "NOTIFICATION_DISPLAY_NAME": "",
+ "NOTIFICATION_NAME": "*",
+ "NOTIFICATION_SUBJECT": "",
+ "NO_OF_ROWS": 1,
+ "REPLACEMENT_USER_NAME": "70915",
+ "ROW_NUM": 1,
+ "RULE_ID": 7770756,
+ "RULE_NAME": "Delegate: Al Oulah, Mohammed",
+ "RULE_STATUS": "Active",
+ "RULE_TIP_MESSAGE": "",
+ "TO_ROW_NUM": 1
+ },
+ {
+ "ACTION": "FORWARD",
+ "ACTION_DISPLAY": "Forward",
+ "BEGIN_DATE": "6/26/2019 2:50:14 PM",
+ "END_DATE": "6/30/2019 2:50:22 PM",
+ "FROM_ROW_NUM": 1,
+ "FYI_FLAG": "Y",
+ "ITEM_TYPE": "HRSSA",
+ "ITEM_TYPE_DISPLAY_NAME": "HR",
+ "MESSAGE": "TEst Rule",
+ "NOTIFICATION_DISPLAY_NAME": "",
+ "NOTIFICATION_NAME": "*",
+ "NOTIFICATION_SUBJECT": "",
+ "NO_OF_ROWS": 1,
+ "REPLACEMENT_USER_NAME": "70915",
+ "ROW_NUM": 1,
+ "RULE_ID": 7770756,
+ "RULE_NAME": "Delegate: Al Oulah, Mohammed",
+ "RULE_STATUS": "Active",
+ "RULE_TIP_MESSAGE": "",
+ "TO_ROW_NUM": 1
+ },
+ {
+ "ACTION": "FORWARD",
+ "ACTION_DISPLAY": "Forward",
+ "BEGIN_DATE": "6/26/2019 2:50:14 PM",
+ "END_DATE": "6/30/2019 2:50:22 PM",
+ "FROM_ROW_NUM": 1,
+ "FYI_FLAG": "Y",
+ "ITEM_TYPE": "HRSSA",
+ "ITEM_TYPE_DISPLAY_NAME": "HR",
+ "MESSAGE": "TEst Rule",
+ "NOTIFICATION_DISPLAY_NAME": "",
+ "NOTIFICATION_NAME": "*",
+ "NOTIFICATION_SUBJECT": "",
+ "NO_OF_ROWS": 1,
+ "REPLACEMENT_USER_NAME": "70915",
+ "ROW_NUM": 1,
+ "RULE_ID": 7770756,
+ "RULE_NAME": "Delegate: Al Oulah, Mohammed",
+ "RULE_STATUS": "Active",
+ "RULE_TIP_MESSAGE": "",
+ "TO_ROW_NUM": 1
+ }
+
+ ];
+
+ }
+
+ ngOnInit() {
+ console.log('OnInit');
+ this.getVacationRules();
+ console.log(this.GetVacationRulesList);
+ }
+
+ Vacation_Type() {
+ this.cs.navigateForward('/vacation-rule/vacation-type');
+ }
+
+ getVacationRules() {
+ this.P_PAGE_NUM = 1;
+ this.IsReachEnd = false;
+ let request: VacationRuleRequest = new VacationRuleRequest();
+ request.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
+ request.P_PAGE_NUM = this.P_PAGE_NUM;
+
+ this.vacationRuleService.getVacationRule(request, () => {
+ this.getVacationRules();
+ }, this.ts.trPK('general', 'retry')).subscribe((result) => {
+ if (this.cs.validResponse(result)) {
+ console.log(result);
+ console.log(JSON.stringify(result));
+ } else {
+ this.cs.presentAlert(result.ErrorEndUserMessage);
+ }
+ });
+ }
+
+ deleteFunc(i) {
+ }
+
+ updateFunc(i) {
+ }
+
+}
diff --git a/Mohem/src/app/vacation-rule/model/VacationRuleRequest.ts b/Mohem/src/app/vacation-rule/model/VacationRuleRequest.ts
new file mode 100644
index 00000000..bb65276d
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/model/VacationRuleRequest.ts
@@ -0,0 +1,7 @@
+import { Request } from '../../hmg-common/services/models/request';
+
+export class VacationRuleRequest extends Request {
+ public static SHARED_DATA = 'vacation-request';
+ public P_PAGE_NUM: number;
+ public P_PAGE_LIMIT: number;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/vacation-rule/model/VacationTypeRequest.ts b/Mohem/src/app/vacation-rule/model/VacationTypeRequest.ts
new file mode 100644
index 00000000..5ecc52e0
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/model/VacationTypeRequest.ts
@@ -0,0 +1,8 @@
+import { Request } from '../../hmg-common/services/models/request';
+
+export class VacationTypeRequest extends Request{
+ public static SHARED_DATA = 'login-request';
+ public static NATIONALITY_CODE="Nationality_Code";
+ public P_USER_NAME:string;
+ public P_PASSWORD: string;
+}
diff --git a/Mohem/src/app/vacation-rule/model/notification.Request.ts b/Mohem/src/app/vacation-rule/model/notification.Request.ts
new file mode 100644
index 00000000..7497663b
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/model/notification.Request.ts
@@ -0,0 +1,8 @@
+
+import { LoginRequest } from '../../hmg-common/services/authentication/models/login.request';
+
+export class notificationTypeRequest extends LoginRequest {
+ public static SHARED_DATA = 'vacation-request';
+ public P_ITEM_TYPE: string;
+ public P_NOTIFICATION_NAME: string;
+}
diff --git a/Mohem/src/app/vacation-rule/model/notification.Respond.ts b/Mohem/src/app/vacation-rule/model/notification.Respond.ts
new file mode 100644
index 00000000..401bc442
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/model/notification.Respond.ts
@@ -0,0 +1,10 @@
+import { Response } from '../../hmg-common/services/models/response';
+
+export class notificationTypeResponse extends Response {
+ public static SHARED_DATA = 'notificationTypeRespond-shared';
+ public FYI_FLAG:string;
+ public NOTIFICATION_DISPLAY_NAME:string;
+ public NOTIFICATION_NAME:string;
+ public NOTIFICATION_SUBJECT:string;
+
+}
diff --git a/Mohem/src/app/vacation-rule/notification-type/notification-type.component.html b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.html
new file mode 100644
index 00000000..65937b1b
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.html
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+ - {{'vacation-rule, itemType' | translate}}
+
+
+
+
+ - {{'vacation-rule, notification-type' | translate}}
+
+
+
+
+ - {{'vacation-rule, create-vacation-rule' | translate}}
+
+
+
+
+
+
+
+
+
+
+
+ {{'vacation-rule, itemType' | translate}}
+
+
+
+
+
+ {{itemType}}
+
+
+
+
+
+
+
+ {{'vacation-rule, all-label' | translate}}
+
+
+
+ {{'vacation-rule, select-label' | translate}}
+
+
+
+
+
+
+
+
+ {{'vacation-rule, notification' | translate}}
+
+
+ {{x.NOTIFICATION_DISPLAY_NAME}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/vacation-rule/notification-type/notification-type.component.scss b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.scss
new file mode 100644
index 00000000..ddfb4343
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.scss
@@ -0,0 +1,20 @@
+li {
+ width: 100%;
+}
+
+.label {
+ white-space: normal;
+}
+
+ion-list,
+ion-item {
+ width: 100%;
+ margin-right: 7%;
+}
+
+.footer-button {
+ border-radius: 3px;
+ padding: 0 1.1em;
+ min-height: 45px;
+ min-width: 200px;
+}
diff --git a/Mohem/src/app/vacation-rule/notification-type/notification-type.component.spec.ts b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.spec.ts
new file mode 100644
index 00000000..e826bdd5
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { NotificationTypeComponent } from './notification-type.component';
+
+describe('NotificationTypeComponent', () => {
+ let component: NotificationTypeComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ NotificationTypeComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(NotificationTypeComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/vacation-rule/notification-type/notification-type.component.ts b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.ts
new file mode 100644
index 00000000..10188377
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.ts
@@ -0,0 +1,49 @@
+import { Component, OnInit } from '@angular/core';
+import { VacationRuleServiceService } from '../service/vacation-rule-service.service';
+import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+import { notificationTypeRequest } from '../model/notification.Request';
+
+@Component({
+ selector: 'app-notification-type',
+ templateUrl: './notification-type.component.html',
+ styleUrls: ['./notification-type.component.scss'],
+})
+export class NotificationTypeComponent implements OnInit {
+
+ itemTypeObj: any;
+ itemType: string;
+ notifTypeSel: any;
+ notification_list: any;
+ var_notification: any;
+
+
+ constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
+ this.itemTypeObj = this.cs.sharedService.getSharedData('selectedItemType');
+ this.itemType = this.itemTypeObj.ITEM_TYPE_DISPLAY_NAME;
+ }
+
+ ngOnInit() {
+ this.getNotificationType();
+ }
+
+ NextPage() {
+ this.cs.navigateForward('/vacation-rule/create-vacation-rule');
+ }
+
+ getNotificationType() {
+ let request: notificationTypeRequest = new notificationTypeRequest();
+ request.P_ITEM_TYPE = this.itemTypeObj.ITEM_TYPE;
+ this.vacationRuleService.getNotificationType(request, () => {
+ this.getNotificationType();
+ }, this.ts.trPK('general', 'retry')).subscribe((result) => {
+ console.log(result);
+ if (this.cs.validResponse(result)) {
+ console.log(result.GetItemTypeNotificationsList);
+ this.notification_list = result.GetItemTypeNotificationsList;
+ } else {
+ this.cs.presentAlert(result.ErrorEndUserMessage);
+ }
+ });
+ }
+}
diff --git a/Mohem/src/app/vacation-rule/service/vacation-rule-service.service.spec.ts b/Mohem/src/app/vacation-rule/service/vacation-rule-service.service.spec.ts
new file mode 100644
index 00000000..a679f19b
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/service/vacation-rule-service.service.spec.ts
@@ -0,0 +1,12 @@
+import { TestBed } from '@angular/core/testing';
+
+import { VacationRuleServiceService } from './vacation-rule-service.service';
+
+describe('VacationRuleServiceService', () => {
+ beforeEach(() => TestBed.configureTestingModule({}));
+
+ it('should be created', () => {
+ const service: VacationRuleServiceService = TestBed.get(VacationRuleServiceService);
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/vacation-rule/service/vacation-rule-service.service.ts b/Mohem/src/app/vacation-rule/service/vacation-rule-service.service.ts
new file mode 100644
index 00000000..5d54a159
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/service/vacation-rule-service.service.ts
@@ -0,0 +1,56 @@
+import { notificationTypeRequest } from './../model/notification.Request';
+import { Response } from 'src/app/hmg-common/services/models/response';
+import { VacationRuleRequest } from './../model/VacationRuleRequest';
+import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
+import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs';
+import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
+import { VacationTypeRequest } from '../model/VacationTypeRequest';
+import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class VacationRuleServiceService {
+
+ /* Vacation Rule Methods */
+ public static getVacationRule = 'Services/ERP.svc/REST/GET_VACATION_RULES';
+ public static changePassword = 'Services/ERP.svc/REST/ChangePassword_FromActiveSession';
+ public static userChecking = 'Services/ERP.svc/REST/Get_BasicUserInformation';
+ public static getVacationType = 'Services/ERP.svc/REST/GET_VR_ITEM_TYPES';
+ public static getNotificationType = 'Services/ERP.svc/REST/GET_ITEM_TYPE_NOTIFICATIONS';
+ public static createVacationRule = 'Services/ERP.svc/REST/CREATE_VACATION_RULE';
+ public static deleteVacationRule = 'Services/ERP.svc/REST/DELETE_VACATION_RULE';
+ public static updateVacationRule = 'Services/ERP.svc/REST/UPDATE_VACATION_RULE';
+ public static respondAttributes = 'Services/ERP.svc/REST/GET_RESPOND_ATTRIBUTES';
+ public static notificationReassign = 'Services/ERP.svc/REST/GET_NOTIFICATION_REASSIGN_MODE';
+
+ constructor(public authService: AuthenticationService, public con: ConnectorService) { }
+
+
+ public getVacationRule(vacationRuleRequest: VacationRuleRequest, onError: any, errorLabel: string): Observable {
+ const request = vacationRuleRequest;
+ console.log(request);
+ this.authService.authenticateRequest(request);
+ return this.con.post(VacationRuleServiceService.getVacationRule, request, onError, errorLabel);
+ }
+
+ public getVacationType(vacationTypeRequest: VacationTypeRequest, onError: any, errorLabel: string): Observable {
+ const request = vacationTypeRequest;
+ this.authService.authenticateRequest(request);
+ return this.con.post(VacationRuleServiceService.getVacationType, request, onError, errorLabel);
+ }
+
+ public getNotificationType(notificationTypeRequest: notificationTypeRequest, onError: any, errorLabel: string): Observable {
+ const request = notificationTypeRequest;
+ this.authService.authenticateRequest(request);
+ return this.con.post(VacationRuleServiceService.getNotificationType, request, onError, errorLabel);
+ }
+
+ public notificationReassign(notificationRequest: LoginRequest, onError: any, errorLabel: string): Observable {
+ const request = notificationRequest;
+ this.authService.authenticateRequest(request);
+ return this.con.post(VacationRuleServiceService.notificationReassign, request, onError, errorLabel);
+ }
+
+}
diff --git a/Mohem/src/app/vacation-rule/vacation-rule.module.ts b/Mohem/src/app/vacation-rule/vacation-rule.module.ts
new file mode 100644
index 00000000..2dcf55ef
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/vacation-rule.module.ts
@@ -0,0 +1,56 @@
+import { HmgCommonModule } from './../hmg-common/hmg-common.module';
+import { HomeComponent } from './home/home.component';
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { Routes, RouterModule } from '@angular/router';
+
+import { IonicModule } from '@ionic/angular';
+
+import { VacationRulePage } from './vacation-rule.page';
+import { VacationTypeComponent } from './vacation-type/vacation-type.component';
+import { NotificationTypeComponent } from './notification-type/notification-type.component';
+import { CreateVacationRuleComponent } from './create-vacation-rule/create-vacation-rule.component';
+
+const routes: Routes = [
+ {
+ path: '',
+ component: VacationRulePage,
+ children: [
+ {
+ path: 'home',
+ component: HomeComponent
+ },
+ {
+ path: 'vacation-type',
+ component: VacationTypeComponent
+ },
+ {
+ path: 'notification-type',
+ component: NotificationTypeComponent
+ },
+ {
+ path: 'create-vacation-rule',
+ component: CreateVacationRuleComponent
+ }
+ ]
+ }
+];
+
+@NgModule({
+ imports: [
+ CommonModule,
+ FormsModule,
+ IonicModule,
+ HmgCommonModule,
+ RouterModule.forChild(routes)
+ ],
+ declarations: [
+ VacationRulePage,
+ HomeComponent,
+ VacationTypeComponent,
+ NotificationTypeComponent,
+ CreateVacationRuleComponent
+ ]
+})
+export class VacationRulePageModule { }
diff --git a/Mohem/src/app/vacation-rule/vacation-rule.page.html b/Mohem/src/app/vacation-rule/vacation-rule.page.html
new file mode 100644
index 00000000..1da5b50d
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/vacation-rule.page.html
@@ -0,0 +1,9 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/vacation-rule/vacation-rule.page.scss b/Mohem/src/app/vacation-rule/vacation-rule.page.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/Mohem/src/app/vacation-rule/vacation-rule.page.spec.ts b/Mohem/src/app/vacation-rule/vacation-rule.page.spec.ts
new file mode 100644
index 00000000..5b482f8e
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/vacation-rule.page.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { VacationRulePage } from './vacation-rule.page';
+
+describe('VacationRulePage', () => {
+ let component: VacationRulePage;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ VacationRulePage ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(VacationRulePage);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/vacation-rule/vacation-rule.page.ts b/Mohem/src/app/vacation-rule/vacation-rule.page.ts
new file mode 100644
index 00000000..e9c3ff3c
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/vacation-rule.page.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-vacation-rule',
+ templateUrl: './vacation-rule.page.html',
+ styleUrls: ['./vacation-rule.page.scss'],
+})
+export class VacationRulePage implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.html b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.html
new file mode 100644
index 00000000..e21f4b06
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+ - {{'vacation-rule, itemType' | translate}}
+
+
+
+
+ - {{'vacation-rule, notification-type' | translate}}
+
+
+
+
+ - {{'vacation-rule, create-vacation-rule' | translate}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{'vacation-rule, itemType' | translate}}
+
+
+ {{x.ITEM_TYPE_DISPLAY_NAME}}
+
+
+
+
+
+
+
+ {{'vacation-rule, skip-step-3' | translate}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.scss b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.scss
new file mode 100644
index 00000000..2c5eb1e1
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.scss
@@ -0,0 +1,102 @@
+li {
+ width: 100%;
+}
+
+.cusprogressbar li:after {
+ width: 100%;
+ height: 2px;
+ content: "";
+ position: absolute;
+ background-color: #d9d9d9;
+ top: 20px;
+}
+
+ion-item {
+ width: 100%;
+ margin-left: 2%;
+ margin-right: 5%;
+}
+
+p.smallTip {
+ font-size: 12px;
+ color: #acacac;
+ padding: 1px 6px;
+}
+
+.footer-button {
+ border-radius: 3px;
+ padding: 0 1.1em;
+ min-height: 45px;
+ min-width: 200px;
+}
+
+// .progcontainer {
+// margin: auto;
+// text-align: center;
+// width: 100%;
+// min-height: 100px;
+// }
+// .cusprogressbar {
+// counter-reset: step;
+// padding: 0px;
+// }
+// .cusprogressbar li {
+// list-style-type: none;
+// width: 33.333%;
+// // @include ltr{
+// // float: left;
+// // }
+// // @include rtl{
+// // float: right;
+// // }
+// font-size: 12px;
+// position: relative;
+// text-align: center;
+// color: #7F8C8D;
+// // @include ltr(){
+// // font-family: $fontFamilySemiBoldEN;
+// // }
+// // @include rtl(){
+// // font-family: $fontFamilyIOSAR;
+// // font-weight: bold;
+// // }
+// }
+// .cusprogressbar li:before {
+// width: 40px;
+// height: 40px;
+// content: counter(step);
+// color: #ffffff;
+// counter-increment: step;
+// line-height: 40px;
+// border: 0px;
+// background-color: #acacac;
+// display: block;
+// text-align: center;
+// margin: 0 auto 10px auto;
+// border-radius: 50%;
+// }
+// .cusprogressbar li:after {
+// width: 100%;
+// height: 2px;
+// content: '';
+// position: absolute;
+// background-color: #d9d9d9;
+// top: 20px;
+// // @include ltr{
+// // left: -50%;
+// // }
+// // @include rtl{
+// // right: -50%;
+// // }
+
+// z-index: -1;
+// }
+// .cusprogressbar li:first-child:after {
+// content: none;
+// }
+// .cusprogressbar li.active {
+// color: #209a83;
+// }
+// .cusprogressbar li.active:before {
+// background-color: #209a83;
+// }
diff --git a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.spec.ts b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.spec.ts
new file mode 100644
index 00000000..80d42517
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { VacationTypeComponent } from './vacation-type.component';
+
+describe('VacationTypeComponent', () => {
+ let component: VacationTypeComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ VacationTypeComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(VacationTypeComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.ts b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.ts
new file mode 100644
index 00000000..9934809f
--- /dev/null
+++ b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.ts
@@ -0,0 +1,58 @@
+import { notificationTypeResponse } from './../model/notification.Respond';
+import { VacationTypeRequest } from './../model/VacationTypeRequest';
+import { Component, OnInit } from '@angular/core';
+import { VacationRuleServiceService } from '../service/vacation-rule-service.service';
+import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+
+@Component({
+ selector: 'app-vacation-type',
+ templateUrl: './vacation-type.component.html',
+ styleUrls: ['./vacation-type.component.scss'],
+})
+export class VacationTypeComponent implements OnInit {
+
+ ruleTypeList: any;
+ index: any;
+
+ constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) { }
+
+ ngOnInit() {
+ this.getVacationType();
+ }
+
+ getVacationType() {
+ let request: VacationTypeRequest = new VacationTypeRequest();
+
+ this.vacationRuleService.getVacationType(request, () => {
+ this.getVacationType();
+ }, this.ts.trPK('general', 'retry')).subscribe((result) => {
+ if (this.cs.validResponse(result)) {
+ this.ruleTypeList = result.VrItemTypesList;
+ console.log(this.ruleTypeList);
+ } else {
+ this.cs.presentAlert(result.ErrorEndUserMessage);
+ }
+ });
+ }
+
+ NextPage() {
+ this.cs.sharedService.setSharedData(this.ruleTypeList[this.index], 'selectedItemType');
+ this.cs.navigateForward('/vacation-rule/notification-type');
+
+ if (this.ruleTypeList[this.index].ITEM_TYPE == "*") {
+ let notificatioAtt: notificationTypeResponse = new notificationTypeResponse();
+ notificatioAtt.FYI_FLAG = "";
+ notificatioAtt.NOTIFICATION_DISPLAY_NAME = "All";
+ notificatioAtt.NOTIFICATION_NAME = "*";
+ notificatioAtt.NOTIFICATION_SUBJECT = "";
+ this.cs.sharedService.setSharedData(notificatioAtt, notificationTypeResponse.SHARED_DATA);
+ this.cs.navigateForward('/vacation-rule/create-vacation-rule');
+ } else {
+ this.cs.navigateForward('/vacation-rule/notification-type');
+ }
+
+
+ }
+
+}
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
diff --git a/Mohem/src/assets/icon/progress-loading.gif b/Mohem/src/assets/icon/progress-loading.gif
new file mode 100644
index 00000000..df5620d4
Binary files /dev/null and b/Mohem/src/assets/icon/progress-loading.gif differ
diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json
index c0dc70ea..5e1b380e 100644
--- a/Mohem/src/assets/localization/i18n.json
+++ b/Mohem/src/assets/localization/i18n.json
@@ -4,636 +4,960 @@
"ar",
"fr"
],
-"login": {
"login": {
- "en": "Login",
- "ar": "الدخول"
- },
- "username":{
- "en":"User Name",
- "ar":"اسم المستخدم"
- },
- "login-type": {
- "en": "Login Type",
- "ar": "نوع الدخول"
- },
- "register": {
- "en": "Register",
- "ar": "التسجيل"
- },
- "sign-out": {
- "en": "Are you sure you want to Sign Out",
- "ar": "هل أنت متأكد من إغلاق الحساب"
- },
- "forgot-id": {
- "en": "Forgot Patient ID",
- "ar": "نسيت رقم الملف"
- },
- "forgot-password": {
- "en": "Forgot Password",
- "ar": "نسيت كلمة المرور"
- },
- "password": {
- "en": "Password",
- "ar": "كلمه السر"
- },
- "forgot-your-id": {
- "en": "Forgot Your Patient ID",
- "ar": "هل نسيت رقم ملف المريض"
- },
- "forgot-desc": {
- "en": "Enter your mobile number to receive your patient file number via SMS",
- "ar": "أدخل رقم جوالك لاستلام رقم الملف الخاص بك عن طريق الرسائل النصية"
- },
- "enter-email": {
- "en": "Please you need to enter your email",
- "ar": "لو سمحت أدخل البريد الإلكتروني الخاص بك"
- },
- "enable-biometric": {
- "en": "Do you want to use biometric sensors to ease your login",
- "ar": "هل ترغب في استخدام أجهزة الاستشعار البصمة لتسهيل تسجيل دخولك"
- },
- "face": {
- "en": "Do you want to login with face recognition",
- "ar": "هل تود الدخول ببصمة الوجة"
- },
- "finger": {
- "en": "Do you want to login with finger print",
- "ar": "هل تود الدخول ببصمة الإصبع"
- },
- "signout": {
- "en": "Sign Out",
- "ar": "تسجيل خروج"
- },
- "find-us": {
- "en": "Find us on social",
- "ar": "تواصل معنا"
- },
- "login-register": {
- "en": "Login / Register",
- "ar": "دخول / تسجيل"
- },
- "id-or-file": {
- "en": "ID or File No",
- "ar": "هوية أو رقم الملف"
- },
- "national-id-or-iqama": {
- "en": "National ID or Iqama",
- "ar": "رقم الهوية أو الإقامة"
- }
-},
-"general": {
- "birth_date": {
- "en": "Birth Date",
- "ar": "تاريخ الميلاد"
- },
- "alert": {
- "en": "Alert",
- "ar": "تنبية"
- },
- "details": {
- "en": "Details",
- "ar": "التفاصيل"
- },
- "title": {
- "en": "Title",
- "ar": "العنوان"
- },
- "info": {
- "en": "Information",
- "ar": "معلومات"
- },
- "reset": {
- "en": "Reset",
- "ar": "إعادة تعيين"
- },
- "ok": {
- "en": "Ok",
- "ar": "موافق"
- },
- "confirm": {
- "en": "Confirm",
- "ar": "تأكيد"
- },
- "cancel": {
- "en": "Cancel",
- "ar": "إلغاء"
- },
- "done": {
- "en": "Done",
- "ar": "تم"
- },
- "close": {
- "en": "Close",
- "ar": "إغلق"
- },
- "back": {
- "en": "Back",
- "ar": "رجوع"
- },
- "about": {
- "en": "About",
- "ar": "عن"
- },
- "hide": {
- "en": "Hide",
- "ar": "إخفي"
- },
- "select-only": {
- "en": "Select",
- "ar": "إختر"
- },
- "select": {
- "en": "Please select",
- "ar": "إختر لو سمحت"
- },
- "need": {
- "en": "You need",
- "ar": "أنت تحتاج"
- },
- "hospital.location": {
- "en": "Hospital Location",
- "ar": "مكان المستشفي"
- },
- "complaint": {
- "en": "Raise Complaint",
- "ar": "إرفع شكوي"
- },
- "retry": {
- "en": "Retry",
- "ar": "أعد"
- },
- "cart": {
- "en": "Add to cart",
- "ar": "أضف للسلة"
- },
- "reminder": {
- "en": "Add Reminder",
- "ar": "أضف تذكير"
- },
- "cancel-reminder": {
- "en": "Cancel Reminder",
- "ar": "الغي تذكير"
- },
- "send-copy": {
- "en": "Send Copy",
- "ar": "أرسل نسخة"
- },
- "personal-info": {
- "en": "Personal Information",
- "ar": "البيانات الشخصية"
- },
- "qualification": {
- "en": "Qualifications",
- "ar": "المؤهلات"
- },
- "nationality": {
- "en": "Nationality",
- "ar": "الجنسية"
- },
- "empty": {
- "en": "Sorry no data avaiable",
- "ar": "لا يوجد بيانات"
- },
- "no-match": {
- "en": "Sorry no match",
- "ar": "لا توجد نتيجة"
+ "login": {
+ "en": "Login",
+ "ar": "الدخول"
+ },
+ "username": {
+ "en": "User Name",
+ "ar": "اسم المستخدم"
+ },
+ "login-type": {
+ "en": "Login Type",
+ "ar": "نوع الدخول"
+ },
+ "register": {
+ "en": "Register",
+ "ar": "التسجيل"
+ },
+ "sign-out": {
+ "en": "Are you sure you want to Sign Out",
+ "ar": "هل أنت متأكد من إغلاق الحساب"
+ },
+ "forgot-id": {
+ "en": "Forgot Patient ID",
+ "ar": "نسيت رقم الملف"
+ },
+ "forgot-password": {
+ "en": "Forgot Password",
+ "ar": "نسيت كلمة المرور"
+ },
+ "password": {
+ "en": "Password",
+ "ar": "كلمه السر"
+ },
+ "changepassword": {
+ "en": "Change Password",
+ "ar": "غير كلمة السر"
+ },
+ "forgot-your-id": {
+ "en": "Forgot Your Patient ID",
+ "ar": "هل نسيت رقم ملف المريض"
+ },
+ "forgot-desc": {
+ "en": "Enter your mobile number to receive your patient file number via SMS",
+ "ar": "أدخل رقم جوالك لاستلام رقم الملف الخاص بك عن طريق الرسائل النصية"
+ },
+ "enter-email": {
+ "en": "Please you need to enter your email",
+ "ar": "لو سمحت أدخل البريد الإلكتروني الخاص بك"
+ },
+ "enable-biometric": {
+ "en": "Do you want to use biometric sensors to ease your login",
+ "ar": "هل ترغب في استخدام أجهزة الاستشعار البصمة لتسهيل تسجيل دخولك"
+ },
+ "face": {
+ "en": "Do you want to login with face recognition",
+ "ar": "هل تود الدخول ببصمة الوجة"
+ },
+ "finger": {
+ "en": "Do you want to login with finger print",
+ "ar": "هل تود الدخول ببصمة الإصبع"
+ },
+ "signout": {
+ "en": "Sign Out",
+ "ar": "تسجيل خروج"
+ },
+ "find-us": {
+ "en": "Find us on social",
+ "ar": "تواصل معنا"
+ },
+ "login-register": {
+ "en": "Login / Register",
+ "ar": "دخول / تسجيل"
+ },
+ "id-or-file": {
+ "en": "ID or File No",
+ "ar": "هوية أو رقم الملف"
+ },
+ "national-id-or-iqama": {
+ "en": "National ID or Iqama",
+ "ar": "رقم الهوية أو الإقامة"
+ },
+ "sms-page": {
+ "en": "Verify OTP",
+ "ar": "تحقق مرة واحدة كلمة المرور"
+ },
+ "password-expired": {
+ "en": "Your password has been expired. Kindly change your password to login again.",
+ "ar": "كلمة المرور الخاصة بك قد انتهت صلاحيتها. يرجى تغيير كلمة المرور لتسجيل الدخول مرة أخرى."
+ }
+ },
+ "verificationcode": {
+ "verificationcode": {
+ "en": "Verification Code",
+ "ar": "رمز التحقق"
+ },
+ "emptyCode": {
+ "en": "Please enter the verification code",
+ "ar": "الرجاء ادخال رمز التحقق"
+ },
+ "title": {
+ "en": "You will receive a ",
+ "ar": " سوف تستلم "
+ },
+ "by": {
+ "en": " by ",
+ "ar": "عن طريق "
+ },
+ "sms": {
+ "en": "SMS",
+ "ar": " رسالة نصية "
+ },
+ "instruct": {
+ "en": " fill the code and ",
+ "ar": " ادخل الرمز و اضغط "
+ }
+ },
+ "general": {
+ "birth_date": {
+ "en": "Birth Date",
+ "ar": "تاريخ الميلاد"
+ },
+ "alert": {
+ "en": "Alert",
+ "ar": "تنبية"
+ },
+ "details": {
+ "en": "Details",
+ "ar": "التفاصيل"
+ },
+ "title": {
+ "en": "Title",
+ "ar": "العنوان"
+ },
+ "info": {
+ "en": "Information",
+ "ar": "معلومات"
+ },
+ "reset": {
+ "en": "Reset",
+ "ar": "إعادة تعيين"
+ },
+ "ok": {
+ "en": "Ok",
+ "ar": "موافق"
+ },
+ "confirm": {
+ "en": "Confirm",
+ "ar": "تأكيد"
+ },
+ "cancel": {
+ "en": "Cancel",
+ "ar": "إلغاء"
+ },
+ "done": {
+ "en": "Done",
+ "ar": "تم"
+ },
+ "close": {
+ "en": "Close",
+ "ar": "إغلق"
+ },
+ "back": {
+ "en": "Back",
+ "ar": "رجوع"
+ },
+ "about": {
+ "en": "About",
+ "ar": "عن"
+ },
+ "hide": {
+ "en": "Hide",
+ "ar": "إخفي"
+ },
+ "select-only": {
+ "en": "Select",
+ "ar": "إختر"
+ },
+ "select": {
+ "en": "Please select",
+ "ar": "إختر لو سمحت"
+ },
+ "need": {
+ "en": "You need",
+ "ar": "أنت تحتاج"
+ },
+ "hospital.location": {
+ "en": "Hospital Location",
+ "ar": "مكان المستشفي"
+ },
+ "complaint": {
+ "en": "Raise Complaint",
+ "ar": "إرفع شكوي"
+ },
+ "retry": {
+ "en": "Retry",
+ "ar": "أعد"
+ },
+ "cart": {
+ "en": "Add to cart",
+ "ar": "أضف للسلة"
+ },
+ "reminder": {
+ "en": "Add Reminder",
+ "ar": "أضف تذكير"
+ },
+ "cancel-reminder": {
+ "en": "Cancel Reminder",
+ "ar": "الغي تذكير"
+ },
+ "send-copy": {
+ "en": "Send Copy",
+ "ar": "أرسل نسخة"
+ },
+ "personal-info": {
+ "en": "Personal Information",
+ "ar": "البيانات الشخصية"
+ },
+ "qualification": {
+ "en": "Qualifications",
+ "ar": "المؤهلات"
+ },
+ "nationality": {
+ "en": "Nationality",
+ "ar": "الجنسية"
+ },
+ "empty": {
+ "en": "Sorry no data avaiable",
+ "ar": "لا يوجد بيانات"
+ },
+ "no-match": {
+ "en": "Sorry no match",
+ "ar": "لا توجد نتيجة"
+ },
+ "home": {
+ "en": "Home",
+ "ar": "الرئيسية"
+ },
+ "date": {
+ "en": "Date",
+ "ar": "التاريخ"
+ },
+ "num": {
+ "en": "No",
+ "ar": "الرقم"
+ },
+ "time": {
+ "en": "Time",
+ "ar": "االوقت"
+ },
+ "week": {
+ "en": "Week",
+ "ar": "أسبوع"
+ },
+ "weeks": {
+ "en": "Weeks",
+ "ar": "أسابيع"
+ },
+ "month": {
+ "en": "Month",
+ "ar": "شهر"
+ },
+ "year": {
+ "en": "Year",
+ "ar": "سنة"
+ },
+ "delete": {
+ "en": "Delete",
+ "ar": "إحذف"
+ },
+ "add": {
+ "en": "Add",
+ "ar": "أضف"
+ },
+ "edit": {
+ "en": "Edit",
+ "ar": "تعديل"
+ },
+ "measure-unit": {
+ "en": "Measure unit",
+ "ar": "وحدة القياس"
+ },
+ "measure-time": {
+ "en": "Measure time",
+ "ar": "وقت القياس"
+ },
+ "save": {
+ "en": "Save",
+ "ar": "إحفظ"
+ },
+ "success": {
+ "en": "Done successfully",
+ "ar": "تم بنجاح"
+ },
+ "other": {
+ "en": "Other",
+ "ar": "أخري"
+ },
+ "provide-missing": {
+ "en": "Please provide required information",
+ "ar": "لو سمحت قم بإدخال البيانات المطلوبة"
+ },
+ "type": {
+ "en": "Type",
+ "ar": "النوع"
+ },
+ "location": {
+ "en": "Location",
+ "ar": "المكان"
+ },
+ "sequence": {
+ "en": "Sequence",
+ "ar": "رقم"
+ },
+ "status": {
+ "en": "Status",
+ "ar": "الحالة"
+ },
+ "scan": {
+ "en": "Scan",
+ "ar": "إبحث"
+ },
+ "stop": {
+ "en": "Stop",
+ "ar": "توقف"
+ },
+ "stop-connection": {
+ "en": "Stop Connection",
+ "ar": "وقف الإتصال"
+ },
+ "remove-measure": {
+ "en": "Are you sure you want to remove this measure",
+ "ar": "هل متأكد تريد حذف عذة القراءة"
+ },
+ "optional": {
+ "en": "Optional",
+ "ar": "خياري"
+ },
+ "search": {
+ "en": "Search",
+ "ar": "إبحث"
+ },
+ "advanced-search": {
+ "en": "Advanced Search",
+ "ar": "بحث متقدم"
+ },
+ "email": {
+ "en": "Email",
+ "ar": "البريد الالكتروني"
+ },
+ "filter": {
+ "en": "Filter",
+ "ar": "تفضيل"
+ },
+ "first-name": {
+ "en": "First Name",
+ "ar": "الاسم الأول"
+ },
+ "middle-name": {
+ "en": "Middle Name",
+ "ar": "إسم الوالد"
+ },
+ "last-name": {
+ "en": "Last Name",
+ "ar": "إسم العائلة"
+ },
+ "subject": {
+ "en": "Subject",
+ "ar": "موضوع"
+ },
+ "message": {
+ "en": "Message",
+ "ar": "رسالة"
+ },
+ "attachment": {
+ "en": "Attachment",
+ "ar": "مرفق"
+ },
+ "select-attachment": {
+ "en": "Select Attachment",
+ "ar": "إختر مرفق"
+ },
+ "large-file": {
+ "en": "Kindly select smaller file",
+ "ar": "لو سمحت إختر ملف أصغر"
+ },
+ "open": {
+ "en": "Open",
+ "ar": "إفتح"
+ },
+ "submit": {
+ "en": "Submit",
+ "ar": "أرسل"
+ },
+ "enter-sms-code": {
+ "en": "Enter verification code",
+ "ar": "أدخل رقم التعريف"
+ },
+ "enter-sms-enable-biometric": {
+ "en": "Enter verification for biometric",
+ "ar": "أدخل رقم التفعيل للبصمة"
+ },
+ "enter-sms": {
+ "en": "Enter sms ",
+ "ar": "أدخل رقم الرسالة"
+ },
+ "no-need": {
+ "en": "No Need",
+ "ar": "لا حاجة"
+ },
+ "search-citeria": {
+ "en": "Select search criteria",
+ "ar": "إختر كيفية البحث"
+ },
+ "search-by-complaint": {
+ "en": "Chaif Complaint Number",
+ "ar": "رقم الشكوي"
+ },
+ "complaint-num": {
+ "en": "Complaint No",
+ "ar": "رقم الشكوي"
+ },
+ "search-by-file": {
+ "en": "File Number",
+ "ar": "رقم الملف"
+ },
+ "search-by-id": {
+ "en": "Identification Number",
+ "ar": "رقم الإقامة"
+ },
+ "enter-complaint-no": {
+ "en": "Enter Chaif Complaint Number",
+ "ar": "أدخل رقم الشكوي"
+ },
+ "enter-file-no": {
+ "en": "Enter File Number",
+ "ar": "أدخل رقم الملف"
+ },
+ "file-no": {
+ "en": "File Number",
+ "ar": "رقم الملف"
+ },
+ "enter-id-no": {
+ "en": "Enter Identification Number",
+ "ar": "أدخل رقم الإقامة أو الهوية"
+ },
+ "id-no": {
+ "en": "Identification Number",
+ "ar": "رقم الإقامة أو الهوية"
+ },
+ "enter-national-id": {
+ "en": "Enter National ID",
+ "ar": "أدخل رقم الهوية"
+ },
+ "national-id": {
+ "en": "National ID",
+ "ar": "رقم الهوية"
+ },
+ "enter-iqama-no": {
+ "en": "Enter ID Number",
+ "ar": "أدخل رقم الإقامة"
+ },
+ "iqama-no": {
+ "en": "ID Number",
+ "ar": "رقم الإقامة"
+ },
+ "complaint-no": {
+ "en": "Complaint No",
+ "ar": "رقم الشكوي"
+ },
+ "number": {
+ "en": "Number",
+ "ar": "الرقم"
+ },
+ "accept": {
+ "en": "Accept",
+ "ar": "موافق"
+ },
+ "decline": {
+ "en": "Decline",
+ "ar": "أرفض"
+ },
+ "usage-agreement": {
+ "en": "Usage Agreement",
+ "ar": "إتفاق الإستخدام"
+ },
+ "loading": {
+ "en": "Loading ...",
+ "ar": "يتم التحميل ..."
+ },
+ "email-sent": {
+ "en": "Email sent successfully",
+ "ar": "تم إرسال نسخة إلي البريد الإلكتروني"
+ },
+ "send-email": {
+ "en": "Do you want to send copy of this examination to your personal email
[0]",
+ "ar": "هل تريد إرسال نسخة من هذا الاختبار إلى بريدك الإلكتروني الشخصي
[0]"
+ },
+ "relogin": {
+ "en": "You need to login to use this service",
+ "ar": "تحتاج إلي الدخول لحسابك من أجل إستخدام هذة الخدمة"
+ },
+ "idle-relogin": {
+ "en": "Your session has expired kindly relogin to use this service ",
+ "ar": "انتهت صلاحية جلستك يرجى التفضل بإعادة الدخول لإستخدام هذه الخدمة"
+ },
+ "select-type": {
+ "en": "Select One",
+ "ar": "اختر فئة"
+ },
+ "from": {
+ "en": "From",
+ "ar": "من"
+ },
+ "to": {
+ "en": "To",
+ "ar": "الى"
+ },
+ "result": {
+ "en": "Result",
+ "ar": "النتيجة"
+ },
+ "select-date": {
+ "en": "Select Date",
+ "ar": "إختر ميعاد"
+ },
+ "normal": {
+ "en": "Normal",
+ "ar": "عادي"
+ },
+ "use-pin": {
+ "en": "Use Pin",
+ "ar": "إستخدم الرقم التعريفي"
+ },
+ "auth-please": {
+ "en": "Please Authenticated",
+ "ar": "عرف نفسك"
+ },
+ "dial-code": {
+ "en": "Dial Code",
+ "ar": "كود الإتصال"
+ },
+ "country": {
+ "en": "Country",
+ "ar": "الدولة"
+ },
+ "settings": {
+ "en": "Settings",
+ "ar": "إعدادات"
+ },
+ "about-app": {
+ "en": "About the app",
+ "ar": "عن التطبيق"
+ },
+ "mobile": {
+ "en": "Mobile No",
+ "ar": "رقم الجوال"
+ },
+ "english": {
+ "en": "English",
+ "ar": "الإنجليزية"
+ },
+ "english-change": {
+ "en": "الإنجليزية",
+ "ar": "English"
+ },
+ "arabic": {
+ "en": "Arabic",
+ "ar": "العربية"
+ },
+ "arabic-change": {
+ "en": "العربية",
+ "ar": "Arabic"
+ },
+ "switch-lng": {
+ "en": "Do you want to change current language",
+ "ar": "هل تريد تغيير اللغة"
+ },
+ "show-more": {
+ "en": "Show More >",
+ "ar": "عرض المزيد >"
+ },
+ "read-less": {
+ "en": "Read Less <",
+ "ar": "قراءة أقل <"
+ },
+ "read-more": {
+ "en": "Read More >",
+ "ar": "اقرأ المزيد >"
+ },
+ "more": {
+ "en": "More...",
+ "ar": "أكثر..."
+ },
+ "send-email-short": {
+ "en": "Email",
+ "ar": "بريد"
+ },
+ "hi": {
+ "en": "HI",
+ "ar": "مرحبا"
+ },
+ "blood-type": {
+ "en": "blood type",
+ "ar": "فصيلة الدم"
+ },
+ "sync-success": {
+ "en": "Data Synced Successfully",
+ "ar": "تمت مزامنة البيانات بنجاح"
+ },
+ "already-synced": {
+ "en": "Latest data already synced",
+ "ar": "أحدث البيانات المتزامنة بالفعل"
+ },
+ "weekly": {
+ "en": "Weekly",
+ "ar": "أسبوعي"
+ },
+ "monthly": {
+ "en": "Monthly",
+ "ar": "شهريا"
+ },
+ "yearly": {
+ "en": "Yearly",
+ "ar": "سنوي"
+ },
+ "report-view": {
+ "en": "Report View",
+ "ar": "عرض تقرير"
+ },
+ "graph-view": {
+ "en": "Graph View",
+ "ar": "عرض الرسم البياني"
+ },
+ "distance-covered": {
+ "en": "Distance covered in KMs",
+ "ar": "المسافة المقطوعة بالكيلومترات"
+ },
+ "steps-covered": {
+ "en": "Steps covered",
+ "ar": "الخطوات المغطاة"
+ },
+ "hours-asleep": {
+ "en": "Time asleep in hours",
+ "ar": "الوقت نائم في ساعات"
+ },
+ "bad": {
+ "en": "Bad",
+ "ar": "سيئ"
+ },
+ "poor": {
+ "en": "Poor",
+ "ar": "ضعيف"
+ },
+ "acceptable": {
+ "en": "Acceptable",
+ "ar": "مقبول"
+ },
+ "good": {
+ "en": "Good",
+ "ar": "جيد"
+ },
+ "excellent": {
+ "en": "Excellent",
+ "ar": "ممتاز"
+ },
+ "not-allowed": {
+ "en": "User has no permissions",
+ "ar": "المستخدم ليس لدية صلاحيات"
+ }
},
"home": {
- "en": "Home",
- "ar": "الرئيسية"
- },
- "date": {
- "en": "Date",
- "ar": "التاريخ"
- },
- "num": {
- "en": "No",
- "ar": "الرقم"
- },
- "time": {
- "en": "Time",
- "ar": "االوقت"
- },
- "week": {
- "en": "Week",
- "ar": "أسبوع"
- },
- "weeks": {
- "en": "Weeks",
- "ar": "أسابيع"
- },
- "month": {
- "en": "Month",
- "ar": "شهر"
- },
- "year": {
- "en": "Year",
- "ar": "سنة"
- },
- "delete": {
- "en": "Delete",
- "ar": "إحذف"
- },
- "add": {
- "en": "Add",
- "ar": "أضف"
- },
- "edit": {
- "en": "Edit",
- "ar": "تعديل"
- },
- "measure-unit": {
- "en": "Measure unit",
- "ar": "وحدة القياس"
- },
- "measure-time": {
- "en": "Measure time",
- "ar": "وقت القياس"
- },
- "save": {
- "en": "Save",
- "ar": "إحفظ"
- },
- "success": {
- "en": "Done successfully",
- "ar": "تم بنجاح"
- },
- "other": {
- "en": "Other",
- "ar": "أخري"
- },
- "provide-missing": {
- "en": "Please provide required information",
- "ar": "لو سمحت قم بإدخال البيانات المطلوبة"
- },
- "type": {
- "en": "Type",
- "ar": "النوع"
- },
- "location": {
- "en": "Location",
- "ar": "المكان"
- },
- "sequence": {
- "en": "Sequence",
- "ar": "رقم"
- },
- "status": {
- "en": "Status",
- "ar": "الحالة"
- },
- "scan": {
- "en": "Scan",
- "ar": "إبحث"
- },
- "stop": {
- "en": "Stop",
- "ar": "توقف"
- },
- "stop-connection": {
- "en": "Stop Connection",
- "ar": "وقف الإتصال"
- },
- "remove-measure": {
- "en": "Are you sure you want to remove this measure",
- "ar": "هل متأكد تريد حذف عذة القراءة"
- },
- "optional": {
- "en": "Optional",
- "ar": "خياري"
- },
- "search": {
- "en": "Search",
- "ar": "إبحث"
- },
- "advanced-search": {
- "en": "Advanced Search",
- "ar": "بحث متقدم"
- },
- "email": {
- "en": "Email",
- "ar": "البريد الالكتروني"
- },
- "filter": {
- "en": "Filter",
- "ar": "تفضيل"
- },
- "first-name": {
- "en": "First Name",
- "ar": "الاسم الأول"
- },
- "middle-name": {
- "en": "Middle Name",
- "ar": "إسم الوالد"
- },
- "last-name": {
- "en": "Last Name",
- "ar": "إسم العائلة"
- },
- "subject": {
- "en": "Subject",
- "ar": "موضوع"
- },
- "message": {
- "en": "Message",
- "ar": "رسالة"
- },
- "attachment": {
- "en": "Attachment",
- "ar": "مرفق"
- },
- "select-attachment": {
- "en": "Select Attachment",
- "ar": "إختر مرفق"
- },
- "large-file": {
- "en": "Kindly select smaller file",
- "ar": "لو سمحت إختر ملف أصغر"
- },
- "open": {
- "en": "Open",
- "ar": "إفتح"
- },
- "submit": {
- "en": "Submit",
- "ar": "أرسل"
- },
- "enter-sms-code": {
- "en": "Enter verification code",
- "ar": "أدخل رقم التعريف"
- },
- "enter-sms-enable-biometric": {
- "en": "Enter verification for biometric",
- "ar": "أدخل رقم التفعيل للبصمة"
- },
- "enter-sms": {
- "en": "Enter sms ",
- "ar": "أدخل رقم الرسالة"
- },
- "no-need": {
- "en": "No Need",
- "ar": "لا حاجة"
- },
- "search-citeria": {
- "en": "Select search criteria",
- "ar": "إختر كيفية البحث"
- },
- "search-by-complaint": {
- "en": "Chaif Complaint Number",
- "ar": "رقم الشكوي"
- },
- "complaint-num": {
- "en": "Complaint No",
- "ar": "رقم الشكوي"
- },
- "search-by-file": {
- "en": "File Number",
- "ar": "رقم الملف"
- },
- "search-by-id": {
- "en": "Identification Number",
- "ar": "رقم الإقامة"
- },
- "enter-complaint-no": {
- "en": "Enter Chaif Complaint Number",
- "ar": "أدخل رقم الشكوي"
- },
- "enter-file-no": {
- "en": "Enter File Number",
- "ar": "أدخل رقم الملف"
- },
- "file-no": {
- "en": "File Number",
- "ar": "رقم الملف"
- },
- "enter-id-no": {
- "en": "Enter Identification Number",
- "ar": "أدخل رقم الإقامة أو الهوية"
- },
- "id-no": {
- "en": "Identification Number",
- "ar": "رقم الإقامة أو الهوية"
- },
- "enter-national-id": {
- "en": "Enter National ID",
- "ar": "أدخل رقم الهوية"
- },
- "national-id": {
- "en": "National ID",
- "ar": "رقم الهوية"
- },
- "enter-iqama-no": {
- "en": "Enter ID Number",
- "ar": "أدخل رقم الإقامة"
- },
- "iqama-no": {
- "en": "ID Number",
- "ar": "رقم الإقامة"
- },
- "complaint-no": {
- "en": "Complaint No",
- "ar": "رقم الشكوي"
- },
- "number": {
- "en": "Number",
- "ar": "الرقم"
- },
- "accept": {
- "en": "Accept",
- "ar": "موافق"
- },
- "decline": {
- "en": "Decline",
- "ar": "أرفض"
- },
- "usage-agreement": {
- "en": "Usage Agreement",
- "ar": "إتفاق الإستخدام"
- },
- "loading": {
- "en": "Loading ...",
- "ar": "يتم التحميل ..."
- },
- "email-sent": {
- "en": "Email sent successfully",
- "ar": "تم إرسال نسخة إلي البريد الإلكتروني"
- },
- "send-email": {
- "en": "Do you want to send copy of this examination to your personal email
[0]",
- "ar": "هل تريد إرسال نسخة من هذا الاختبار إلى بريدك الإلكتروني الشخصي
[0]"
- },
- "relogin": {
- "en": "You need to login to use this service",
- "ar": "تحتاج إلي الدخول لحسابك من أجل إستخدام هذة الخدمة"
- },
- "idle-relogin": {
- "en": "Your session has expired kindly relogin to use this service ",
- "ar": "انتهت صلاحية جلستك يرجى التفضل بإعادة الدخول لإستخدام هذه الخدمة"
- },
- "select-type": {
- "en": "Select One",
- "ar": "اختر فئة"
- },
- "from": {
- "en": "From",
- "ar": "من"
- },
- "to": {
- "en": "To",
- "ar": "الى"
- },
- "result": {
- "en": "Result",
- "ar": "النتيجة"
- },
- "select-date": {
- "en": "Select Date",
- "ar": "إختر ميعاد"
- },
- "normal": {
- "en": "Normal",
- "ar": "عادي"
- },
- "use-pin": {
- "en": "Use Pin",
- "ar": "إستخدم الرقم التعريفي"
- },
- "auth-please": {
- "en": "Please Authenticated",
- "ar": "عرف نفسك"
- },
- "dial-code": {
- "en": "Dial Code",
- "ar": "كود الإتصال"
- },
- "country": {
- "en": "Country",
- "ar": "الدولة"
- },
- "settings": {
- "en": "Settings",
- "ar": "إعدادات"
- },
- "about-app": {
- "en": "About the app",
- "ar": "عن التطبيق"
- },
- "mobile": {
- "en": "Mobile No",
- "ar": "رقم الجوال"
- },
- "english": {
- "en": "English",
- "ar": "الإنجليزية"
- },
- "english-change": {
- "en": "الإنجليزية",
- "ar": "English"
- },
- "arabic": {
- "en": "Arabic",
- "ar": "العربية"
- },
- "arabic-change": {
- "en": "العربية",
- "ar": "Arabic"
- },
- "switch-lng": {
- "en": "Do you want to change current language",
- "ar": "هل تريد تغيير اللغة"
- },
- "show-more": {
- "en": "Show More >",
- "ar": "عرض المزيد >"
- },
- "read-less": {
- "en": "Read Less <",
- "ar": "قراءة أقل <"
- },
- "read-more": {
- "en": "Read More >",
- "ar": "اقرأ المزيد >"
- },
- "more":{
- "en": "More...",
- "ar": "أكثر..."
- },
- "send-email-short": {
- "en": "Email",
- "ar": "بريد"
- },
- "hi": {
- "en": "HI",
- "ar": "مرحبا"
- },
- "blood-type": {
- "en": "blood type",
- "ar": "فصيلة الدم"
- },
- "sync-success": {
- "en": "Data Synced Successfully",
- "ar": "تمت مزامنة البيانات بنجاح"
- },
- "already-synced": {
- "en": "Latest data already synced",
- "ar": "أحدث البيانات المتزامنة بالفعل"
- },
- "weekly": {
- "en": "Weekly",
- "ar": "أسبوعي"
- },
- "monthly": {
- "en": "Monthly",
- "ar": "شهريا"
- },
- "yearly": {
- "en": "Yearly",
- "ar": "سنوي"
- },
- "report-view": {
- "en": "Report View",
- "ar": "عرض تقرير"
- },
- "graph-view": {
- "en": "Graph View",
- "ar": "عرض الرسم البياني"
- },
- "distance-covered": {
- "en": "Distance covered in KMs",
- "ar": "المسافة المقطوعة بالكيلومترات"
- },
- "steps-covered": {
- "en": "Steps covered",
- "ar": "الخطوات المغطاة"
- },
- "hours-asleep": {
- "en": "Time asleep in hours",
- "ar": "الوقت نائم في ساعات"
- },
- "bad": {
- "en": "Bad",
- "ar": "سيئ"
- },
- "poor": {
- "en": "Poor",
- "ar": "ضعيف"
- },
- "acceptable": {
- "en": "Acceptable",
- "ar": "مقبول"
- },
- "good": {
- "en": "Good",
- "ar": "جيد"
- },
- "excellent": {
- "en": "Excellent",
- "ar": "ممتاز"
- },
- "not-allowed": {
- "en": "User has no permissions",
- "ar": "المستخدم ليس لدية صلاحيات"
+ "dashboard": {
+ "en": "My Dashboard",
+ "ar": "الرئيسية"
+ },
+ "hello": {
+ "en": "Hello",
+ "ar": "مرحبا"
+ },
+ "logout": {
+ "en": "Logout",
+ "ar": "تسجيل الخروج"
+ },
+ "worklist": {
+ "en": "Work List",
+ "ar": "قائمة العمل"
+ },
+ "possitionAlert": {
+ "en": "The app could not access your location. Make sure that the location service is enabled from your device settings",
+ "ar": "تعذر على التطبيق الوصول إلى موقعك. تأكد من تفعيل خدمة الموقع من إعدادات جهازك"
+ },
+ "swipeAlertSuccess": {
+ "en": "Your swipe done successfully",
+ "ar": "تم تسجيل الدخول بنجاح"
+ },
+ "swipeAlertFailed": {
+ "en": "your swipe Failed, please try again...",
+ "ar": "حدث خطاء في تسجيل الدخول فضلاً اعد المحاولة"
+ }
+ },
+ "userProfile": {
+ "title": {
+ "en": "My Profile",
+ "ar": "معلوماتي"
+ },
+ "empNo": {
+ "en": "Employee Number",
+ "ar": "الرقم الوظيفي"
+ },
+ "busG": {
+ "en": "Business Group",
+ "ar": "مجموعة العمل"
+ },
+ "job": {
+ "en": "Job",
+ "ar": "الوظيفة"
+ },
+ "locName": {
+ "en": "Location Name",
+ "ar": "اسم الموقع"
+ },
+ "payrol": {
+ "en": "Payroll",
+ "ar": "كشف الرواتب"
+ },
+ "orgEmail": {
+ "en": "Organization Email Address",
+ "ar": "البريد الإلكتروني للمنشأة"
+ },
+ "name": {
+ "en": "Emplyee Name",
+ "ar": "اسم الموظف "
+ },
+ "orgName": {
+ "en": "Organization Name",
+ "ar": "اسم المنشأة"
+ },
+ "position": {
+ "en": "Position",
+ "ar": "منصب"
+ },
+ "grade": {
+ "en": "Grade",
+ "ar": "الدرجة"
+ },
+ "category": {
+ "en": "Category",
+ "ar": "الفئة"
+ }
+ },
+ "changePassword": {
+ "successChange": {
+ "en": "Password Changed successfully",
+ "ar": "تم تغيير كلمة المرور بنجاح"
+ },
+ "currentPassword": {
+ "en": "Current Password",
+ "ar": "تغيير كلمة المرور"
+ },
+ "confirmPassword": {
+ "en": "Confirm Password",
+ "ar": ""
+ },
+ "newPassword": {
+ "en": "New Password",
+ "ar": ""
+ },
+ "changePassword": {
+ "en": "Change Password",
+ "ar": ""
+ },
+ "codeNumber": {
+ "en": "verification code",
+ "ar": ""
+ },
+ "emptyNewPassword": {
+ "en": "Please fill New Password field",
+ "ar": ""
+ },
+ "emptyOldPassword": {
+ "en": "Please fill Old Password field",
+ "ar": ""
+ },
+ "emptyConfirmPassword": {
+ "en": "Please fill Confirm Password field",
+ "ar": ""
+ }
+ },
+ "attendance": {
+ "attendance": {
+ "ar": "الحضور",
+ "en": "Attendance"
+ }
+ },
+ "vacation-rule": {
+ "vacationRule": {
+ "en": "Vacation Rule",
+ "ar": "قواعد الإجازات"
+ },
+ "ruleName": {
+ "en": "Rule Name",
+ "ar": "اسم القاعدة"
+ },
+ "itemType": {
+ "en": "Item Type",
+ "ar": "نوع العنصر"
+ },
+ "notification": {
+ "en": "Notification",
+ "ar": "إشعار"
+ },
+ "status": {
+ "en": "Status",
+ "ar": "حالة"
+ },
+ "createRule": {
+ "en": "Create Rule",
+ "ar": "إنشاء قاعدة"
+ },
+ "ruleInfo": {
+ "en": "Rule Information",
+ "ar": "معلومات القاعدة"
+ },
+ "deleteVR": {
+ "en": "Are you sure you want to delete this rule?",
+ "ar": "هل تريد فعلا حذف هذه القاعدة؟"
+ },
+ "tip": {
+ "en": "You can EDIT or DELETE your current rules or CREATE RULE
",
+ "ar": "يمكنك تعديل أو حذف القواعد الحالية أو إنشاء قاعدة جديدة
"
+ },
+ "vacation-type": {
+ "en": "Vacation Type",
+ "ar": "نوع العطلة"
+ },
+ "create-vacation-rule": {
+ "en": "Create Vacation Rule",
+ "ar": "إنشاء قاعدة عطلة"
+ },
+ "vacation-type-text": {
+ "en": "Choose Vacation Type from the below list
",
+ "ar": "يمكنك تعديل أو حذف القواعد الحالية أو إنشاء قاعدة جديدة
"
+ },
+ "skip-step-3": {
+ "en": "If All is selected, you will skip to step 3",
+ "ar": "إذا اخترت الكل سوف تتخطى الخطوة 3"
+ },
+ "next-label": {
+ "en": "Next",
+ "ar": "التالى"
+ },
+ "notification-type": {
+ "en": "Notification Type",
+ "ar": "نوع إعلام"
+ },
+ "notification-tip": {
+ "en": "Indicate the notification format that will activate this rule",
+ "ar": "إظهار شكل الإشعارات التي تفعل هذه القاعدة"
+ },
+ "all-label": {
+ "en": "All",
+ "ar": "الكل"
+ },
+ "select-label": {
+ "en": "Select",
+ "ar": "تحديد"
+ },
+ "start-date": {
+ "en": "Start Date",
+ "ar": "تاريخ البدء"
+ },
+ "end-date": {
+ "en": "End Date",
+ "ar": "تاريخ الانتهاء"
+ },
+ "message-label": {
+ "en": "Message",
+ "ar": "رسالة"
+ }
+ },
+ "absenceList": {
+ "absenceList": {
+ "en": "Absence list",
+ "ar": "قائمة الإجازات"
+ },
+ "accrualBalances": {
+ "en": "Accrual Balances",
+ "ar": "رصيد حساب المستحقات"
+ },
+ "createAbsence": {
+ "en": "Create Absence",
+ "ar": "إنشاء إجازة"
+ },
+ "startDate": {
+ "en": "Start Date",
+ "ar": "تاريخ البداية"
+ },
+ "endDate": {
+ "en": "End Date",
+ "ar": "تاريخ النهاية"
+ },
+ "absenceType": {
+ "en": "Absence Type",
+ "ar": "نوع الإجازة"
+ },
+ "absenceCategory": {
+ "en": "Absence Category",
+ "ar": "فئة الإجازة"
+ },
+ "days": {
+ "en": "Days",
+ "ar": "أيام"
+ },
+ "hours": {
+ "en": "Hours",
+ "ar": "ساعات"
+ },
+ "approvalStatus": {
+ "en": "Approval Status",
+ "ar": "حالة الموافقة"
+ },
+ "absenceStatus": {
+ "en": "Absence Status",
+ "ar": "حالة الإجازة"
+ },
+ "createAbs": {
+ "en": "Create Absence",
+ "ar": "إضافة"
+ },
+ "attach": {
+ "en": "Attachments",
+ "ar": "المرفقات"
+ },
+ "absHeader": {
+ "en": "Absence Details",
+ "ar": "معلومات الإجازة"
+ },
+ "attachList": {
+ "en": "Attachment List",
+ "ar": "قائمة المرفقات"
+ }
+ },
+ "accrualBalances": {
+ "accrualBalances":{
+ "en":"Accrual Balances",
+ "ar":"رصيد حساب المستحقات"
+ },
+ "selectDate":{
+ "en": "Select Date",
+ "ar": "اختر التاريخ"
+ },
+ "tip":{
+ "en":"Enter the date for which you wish to view your accrual balances.
",
+ "ar":"أدخل التاريخ الذي تريد عرض الإستحقاقات له
"
+ }
}
-}
}
\ No newline at end of file
diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss
index 307a507a..9c90f0df 100644
--- a/Mohem/src/theme/styles.scss
+++ b/Mohem/src/theme/styles.scss
@@ -28,6 +28,10 @@ body{
}
+ .header-toolbar {
+ --background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
+ }
+
ion-label{
color:var(--labelColor) !important;
}
@@ -57,24 +61,18 @@ ion-label{
}
-.loaderGif{
+.loading-gif{
background: transparent !important;
width:100px;
height: 100px;
}
-.loading-md .loading-wrapper,
-.loading-ios .loading-wrapper{
+#custom-progress-loader .container{
background: transparent !important;
box-shadow: none;
-webkit-box-shadow:none;
-moz-box-shadow: none;
width: 150px;
}
-.loading-md ,.loading-ios {
- ion-backdrop{
- background-color: #8c8c8c !important;
- }
-}
/***********change header color***************/
.headerBtn{
@@ -83,7 +81,12 @@ ion-label{
.headerImg{
width: 36px;
}
-
+.header-toolbar{
+ --background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
+}
+.btnBack{
+ background: transparent !important;
+}
/***************/
.attachImg{
max-width: 30px;
@@ -139,10 +142,10 @@ ion-header ion-icon.icon.icon-ios.ion-ios-add{
color: (--darkgray);
}
.toolbar-background {
- background: (--primary);
- background: -moz-linear-gradient(45deg, (--primary) 0%, (--secondary) 36%,(--secondary) 59%, (--customnavy) 100%);
- background: -webkit-linear-gradient(45deg, (--primary) 0%, (--secondary) 36%,(--secondary) 59%, (--customnavy) 100%);
- background: linear-gradient(45deg, (--primary) 0%, (--secondary) 36%,(--secondary) 59%, (--customnavy) 100%);
+ background: var(--primary);
+ background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
+ background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
+ background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='var(--primary)', endColorstr='--var(customnavy)',GradientType=1 );
}
/***************button bckground***************/