diff --git a/Mohem/src/app/authentication/login/login.component.html b/Mohem/src/app/authentication/login/login.component.html
index 159c97af..46cecfb8 100644
--- a/Mohem/src/app/authentication/login/login.component.html
+++ b/Mohem/src/app/authentication/login/login.component.html
@@ -59,7 +59,7 @@
diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts
index c1dd4c25..5736609d 100644
--- a/Mohem/src/app/authentication/login/login.component.ts
+++ b/Mohem/src/app/authentication/login/login.component.ts
@@ -1,56 +1,28 @@
-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, Platform, Events } 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 { 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, Platform, Events } 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 { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response';
import { PushService } from 'src/app/hmg-common/services/push/push.service';
@Component({
- selector: "login",
- templateUrl: "./login.component.html",
- styleUrls: ["./login.component.scss"]
+ selector: 'login',
+ templateUrl: './login.component.html',
+ styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit, OnDestroy {
- appLang: number = 1;
- isExpired: boolean = false;
- isSupportAr: boolean = false;
- isAppleStore: boolean = false;
- memberLogin: any = {};
- private password: string;
- private language: string;
- private username: string;
- private remeberMe: boolean;
- private iosLink: string;
- private androidLink: string;
- private currentLang: any = 1;
- private patientOutSA: boolean;
- private loginTokenID: string;
- private isMobileFingerPrint: boolean;
- private FingerPrintPatientIdentificationID: string;
- private loginData = new LoginModel();
- private empname:any;
- private logintype:any;
- public loginDiv:boolean =true;
- public welcomeBack:boolean =false;
- public logo = "assets/icon/login/password.png";
- deviceToken: any="";
- user: boolean =false;
- DeviceType: string;
- requestGetLoginInfo:any;
- logoutFlage: boolean ;
- getuser:any="";
constructor(
public cs: CommonService,
@@ -60,20 +32,21 @@ export class LoginComponent implements OnInit, OnDestroy {
public ts: TranslatorService,
public smsService: SmsReaderService,
private faio: FingerprintAIO,
- public events:Events,
+ public events: Events,
public ngZone: NgZone,
public device: Device,
public splash: SplashScreen,
public sharedData: SharedDataService,
public plt: Platform,
public pushService: PushService
- ) {
- this.events.subscribe("logoutFlage", logoutFlage => {
- console.log("login compont logoutFlage: "+logoutFlage);
- if(logoutFlage == true){
- console.log(" subscribe check logoutFlage: "+logoutFlage);
+ ) {
+ this.events.subscribe('logoutFlage', logoutFlage => {
+ console.log('login compont logoutFlage: ' + logoutFlage);
+ // tslint:disable-next-line: triple-equals
+ if (logoutFlage == true) {
+ console.log(' subscribe check logoutFlage: ' + logoutFlage);
this.logoutFlage = logoutFlage;
- localStorage.setItem('logoutFlage',logoutFlage);
+ localStorage.setItem('logoutFlage', logoutFlage);
}
});
@@ -82,15 +55,44 @@ export class LoginComponent implements OnInit, OnDestroy {
false
);
// alert(" this.getuser "+this.getuser);
- if(this.getuser){
+ if (this.getuser) {
this.user = true;
- }
- else{
+ } else {
this.user = false;
-
+
}
}
+ appLang = 1;
+ isExpired = false;
+ isSupportAr = false;
+ isAppleStore = false;
+ memberLogin: any = {};
+ public password: string;
+ private language: string;
+ public username: string;
+ public remeberMe: boolean;
+ private iosLink: string;
+ private androidLink: string;
+ public currentLang: any = 1;
+ private patientOutSA: boolean;
+ private loginTokenID: string;
+ private isMobileFingerPrint: boolean;
+ private FingerPrintPatientIdentificationID: string;
+ private loginData = new LoginModel();
+ private empname: any;
+ private logintype: any;
+ public loginDiv = true;
+ public welcomeBack = false;
+ public logo = 'assets/icon/login/password.png';
+ deviceToken: any = '';
+ user = false;
+ DeviceType: string;
+ requestGetLoginInfo: any;
+ logoutFlage: boolean ;
+ getuser: any = '';
+
+ private checkUserResult: CheckUserAuthenticationResponse;
ngOnInit() {
console.log("ENAD TEST!!!")
@@ -103,7 +105,7 @@ export class LoginComponent implements OnInit, OnDestroy {
this.currentLang = TranslatorService.getCurrentLanguageCode();
// this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// console.log("get deviceToken login"+ this.deviceToken)
-
+
// this.getuser = this.cs.sharedService.getSharedData(
// AuthenticationService.IMEI_USER_DATA,
@@ -116,61 +118,62 @@ export class LoginComponent implements OnInit, OnDestroy {
// }
- this.events.subscribe("user", user => {
- console.log("login compont: "+user);
+ this.events.subscribe('user', user => {
+ console.log('login compont: ' + user);
this.user = user;
-
+
});
-
-
-
- this.deviceToken= localStorage.getItem('devicyeToken');
- console.log("let deviceToken" + this.deviceToken);
- if (this.deviceToken) {
+
+
+ this.deviceToken = localStorage.getItem('devicyeToken');
+ console.log('let deviceToken' + this.deviceToken);
+
+ if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
} else {
- console.log("no deviceToken" );
+ console.log('no deviceToken' );
- this.pushService.startReceiving();
- setTimeout(() => {
+ this.pushService.startReceiving();
+ setTimeout(() => {
// alert('login enabled second time: ' + this.deviceToken);
}, 1000);
}
-
+
// setTimeout(() => {
// alert("this.logoutFlage in setTime" +localStorage.getItem('logoutFlage'));
// alert("this.this.user in setTime" + this.user);
// if(localStorage.getItem('logoutFlage')== "true"){
// this.getLastLoginInfo();
-
+
// }
// },1000);
-
-
- //here will delete below part and depdding on user (response from getMobileInfo)
- this.username = localStorage.getItem("user");
- this.password = localStorage.getItem("password"); //****//
- let remember = localStorage.getItem("remember");//****//
- this.empname= localStorage.getItem("emp-name");
- this.logintype= localStorage.getItem("login-type");
- if (remember == "true") { this.remeberMe = true } else { this.remeberMe = false }
- //here will be check on user if exite then s part and depdding on user (response from getMobileInfo)
- if(this.user){
+ // here will delete below part and depdding on user (response from getMobileInfo)
+ this.username = localStorage.getItem('user');
+ this.password = localStorage.getItem('password'); // ****//
+ const remember = localStorage.getItem('remember'); // ****//
+ this.empname = localStorage.getItem('emp-name');
+ this.logintype = localStorage.getItem('login-type');
+ // tslint:disable-next-line: triple-equals
+ if (remember == 'true') { this.remeberMe = true; } else { this.remeberMe = false; }
+
+ // here will be check on user if exite then s part and depdding on user (response from getMobileInfo)
+
+ if (this.user) {
// this.loginDiv=false;
// this.welcomeBack=true;
- }else{
+ } else {
// this.user=true;
// this.welcomeBack=false;
}
@@ -200,8 +203,7 @@ export class LoginComponent implements OnInit, OnDestroy {
this.currentLang = TranslatorService.getCurrentLanguageCode();
}
}
-
- private forgetPasswordPage() {
+ public forgetPasswordPage() {
this.cs.openUserForgot();
}
@@ -213,15 +215,15 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public addValue(e): void {
- // console.log(e.currentTarget.checked);
- this.remeberMe = true;//e.currentTarget.checked;
+ // console.log(e.currentTarget.checked);
+ this.remeberMe = true; // e.currentTarget.checked;
this.remeberMyInfo();
}
public remeberMyInfo() {
// if (this.remeberMe) {
- if(this.username){localStorage.setItem("user", this.username);}
- if(this.password){localStorage.setItem("password", this.password);}
- localStorage.setItem("remember", "true");
+ if (this.username) {localStorage.setItem('user', this.username); }
+ if (this.password) {localStorage.setItem('password', this.password); }
+ localStorage.setItem('remember', 'true');
// } else {
// localStorage.setItem("user", "");
// localStorage.setItem("password", "");
@@ -230,21 +232,21 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public onLogin() {
- console.log("onLogin");
+ console.log('onLogin');
// this.checkAppUpdated();
// this.checkUserAuthentication();
- this.deviceToken = localStorage.getItem('deviceToken');
- console.log("let deviceToken" + this.deviceToken);
+ this.deviceToken = localStorage.getItem('deviceToken');
+ console.log('let deviceToken' + this.deviceToken);
- if (this.deviceToken) {
+ if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
this.checkAppUpdated();
} else {
- console.log("no deviceToken" );
+ console.log('no deviceToken' );
- this.pushService.startReceiving();
- setTimeout(() => {
+ this.pushService.startReceiving();
+ setTimeout(() => {
this.deviceToken = localStorage.getItem('deviceToken');
this.checkAppUpdated();
console.log('login enabled second time: ' + this.deviceToken);
@@ -257,31 +259,34 @@ export class LoginComponent implements OnInit, OnDestroy {
() => {
/* Write code for error */
}).subscribe((result: CheckAppVersionResponse) => {
+ // tslint:disable-next-line: triple-equals
if (result.MessageStatus == 2 && result.ErrorType == 4) {
- this.cs.presentAcceptDialog(result.ErrorEndUserMessage,()=>{
- this.handleAppUpdate(result)
+ this.cs.presentAcceptDialog(result.ErrorEndUserMessage, () => {
+ this.handleAppUpdate(result);
});
+ // tslint:disable-next-line: triple-equals
} else if (result.MessageStatus == 1) {
this.checkUserAuthentication();
}
});
}
- private handleAppUpdate(result){
+ private handleAppUpdate(result) {
this.iosLink = result.IOSLink;
this.androidLink = result.AndroidLink;
if (this.plt.is('android')) {
- if (this.androidLink)
+ if (this.androidLink) {
window.open(this.androidLink, '_system');
- }
- else if (this.plt.is('ios')) {
- if (this.iosLink)
+ }
+ } else if (this.plt.is('ios')) {
+ if (this.iosLink) {
window.open(this.iosLink, '_system');
+ }
}
}
private checkUserAuthentication() {
- console.log("debug Here!!");
+ console.log('debug Here!!');
console.log(this.username);
console.log(this.language);
console.log(this.password);
@@ -294,13 +299,13 @@ export class LoginComponent implements OnInit, OnDestroy {
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"))
+ 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");
+ console.log('success');
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
// alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList[0].EMPLOYEE_NAME);
@@ -312,14 +317,14 @@ export class LoginComponent implements OnInit, OnDestroy {
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.remeberMyInfo();
- //this.cs.openSMSPage(); phase#1 one type of OTP
+ // this.cs.openSMSPage(); phase#1 one type of OTP
// if(!this.welcomeBack){
- this.cs.openConfirmLoginPage();//phase#2 add 4 types for OTP
+ this.cs.openConfirmLoginPage(); // phase#2 add 4 types for OTP
// }
} else {
- console.log("result.IsPasswordExpired");
+ console.log('result.IsPasswordExpired');
console.log(result.IsPasswordExpired);
if (result.IsPasswordExpired) {
this.presentPasswordExpiredDialog();
@@ -334,11 +339,11 @@ export class LoginComponent implements OnInit, OnDestroy {
async presentPasswordExpiredDialog() {
const alert = await this.alertController.create({
- header: this.ts.trPK("general", "confirm"),
- message: this.ts.trPK("login", "password-expired"),
+ header: this.ts.trPK('general', 'confirm'),
+ message: this.ts.trPK('login', 'password-expired'),
buttons: [
{
- text: this.ts.trPK("general", "ok"),
+ text: this.ts.trPK('general', 'ok'),
handler: () => {
console.log('Confirm Okay');
this.sharedData.setSharedData(true, Password.IS_EXPIRED_PSW);
@@ -371,23 +376,21 @@ export class LoginComponent implements OnInit, OnDestroy {
});
}
- private checkUserResult: CheckUserAuthenticationResponse;
-
private sendSMSForForgotPassword() {
this.cs.startLoading();
- let changePwdObj = new LoginRequest();
+ const 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();
+ // 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('2');
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
@@ -403,31 +406,31 @@ export class LoginComponent implements OnInit, OnDestroy {
}
login() {
- console.log("login emit");
- console.log("login");
- // this.checkUserAuthentication();
- //this.loginDiv=true;
- this.user=false;
+ console.log('login emit');
+ console.log('login');
+ // this.checkUserAuthentication();
+ // this.loginDiv=true;
+ this.user = false;
}
-
-
+
+
loginWithUser() {
- console.log("loginWithUser")
+ console.log('loginWithUser');
this.cs.openConfirmLoginPage();
}
///
- getLastLoginInfo(){
- this.requestGetLoginInfo= {
- DeviceType:this.cs.getDeviceType(),//"Android",//this.cs.getDeviceType(),
- DeviceToken:this.deviceToken//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
- }
- this.authService.getLoginInfo(this.requestGetLoginInfo,() => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
+ getLastLoginInfo() {
+ this.requestGetLoginInfo = {
+ DeviceType: this.cs.getDeviceType(), // "Android",//this.cs.getDeviceType(),
+ DeviceToken: this.deviceToken// "5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
+ };
+ this.authService.getLoginInfo(this.requestGetLoginInfo, () => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) {
- if(res.Mohemm_GetMobileLoginInfoList.length > 0){
+ if (res.Mohemm_GetMobileLoginInfoList.length > 0) {
this.cs.sharedService.setSharedData(
// res.Patient_SELECTDeviceIMEIbyIMEIList[0],
@@ -436,15 +439,14 @@ export class LoginComponent implements OnInit, OnDestroy {
);
this.user = true;
- }
- else{
- this.user=false
+ } else {
+ this.user = false;
}
}
});
}
-
-
+
+
}
diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.ts b/Mohem/src/app/eit/add-eit/add-eit.component.ts
index f9101271..384143a2 100644
--- a/Mohem/src/app/eit/add-eit/add-eit.component.ts
+++ b/Mohem/src/app/eit/add-eit/add-eit.component.ts
@@ -21,6 +21,8 @@ import { DatePicker } from "@ionic-native/date-picker/ngx";
import { EIT_ACTION } from "../models/submit.eit.action";
import { AddEitResponse } from "../models/add.eit.response";
import { element } from '@angular/core/src/render3';
+// import { EITNotificatonBodyResponse } from 'src/app/notification/models/EITNotificationBodyRes';
+import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes";
@Component({
selector: "app-add-eit",
@@ -87,6 +89,8 @@ export class AddEitComponent implements OnInit {
false
);
this.addEITData = this.cs.sharedService.getSharedData("AddEITData", false);
+ console.log("addEITData: " + this.addEITData);
+ console.log("dirfromNotificationPage: " + this.addEITData.dirfromNotificationPage);
this.eitRequest = new EitRequest();
@@ -94,7 +98,7 @@ export class AddEitComponent implements OnInit {
////*new add*/////
/**********resubmit************ */
- // this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
+ this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);//WARINING
this.getPassdirfromNotifiPage = this.addEITData.dirfromNotificationPage;
if (this.getPassdirfromNotifiPage) {
this.functionName = this.getPassNotificationDetails.FUNCTION_NAME; //;this.getPassNotificationDetails.NOTIFICATION_NAME;
@@ -1555,6 +1559,7 @@ export class AddEitComponent implements OnInit {
validateEITTransaction() {
// let EITTransactionValues:any= [];
+
this.arrValues = this.getElementsValues();
if (this.arrValues) {
this.eitRequest = {
@@ -1586,7 +1591,8 @@ export class AddEitComponent implements OnInit {
data.eitRequest = this.eitRequest;
data.updated = this.updatedValues;
// this.viewCtrl.dismiss(data);
- this.closemodal();
+ this.modalController.dismiss(data);
+ // this.closemodal();
} else {
this.submitEit();
// this.navCtrl.push("ConfirmAddEitPage");
diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
index 576200f4..f8a6c040 100644
--- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
+++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
@@ -24,7 +24,7 @@ export class ConfirmAddEitComponent implements OnInit {
private P_TransactionID: number;
private eitRequest: EitRequest;
- approversList: ApproversList;
+ approversList = [];
addrespList: any;//EitRespModel;
eitComments: string = "";
menuType: string = "";
@@ -36,7 +36,7 @@ export class ConfirmAddEitComponent implements OnInit {
headerTitle: string = "";
isTrue: any = 0;
attachItems: any;
- private isResubmitEIT: boolean = false;
+ public isResubmitEIT: boolean = false;
private itemKey: string = "";
private pActionMode: string = "SUBMIT";
attachReqObj: WorkListButtonRequest = new WorkListButtonRequest();
@@ -78,11 +78,12 @@ export class ConfirmAddEitComponent implements OnInit {
this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false);
this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit;
if (this.isResubmitEIT) {
- this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
+ this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING **
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
this.P_TransactionID = this.cs.sharedService.getSharedData("TransactionIDResubmit", true);
- let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
- this.itemKey = notification.ITEM_KEY;
+ // let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
+
+ this.itemKey = this.getPassNotificationDetails.ITEM_KEY;
this.pActionMode = "RESUBMIT";
this.menuType = "E";
this.respID = -999;
diff --git a/Mohem/src/app/eit/eit-list/eit-list.component.html b/Mohem/src/app/eit/eit-list/eit-list.component.html
index b8c2c570..665dafc7 100644
--- a/Mohem/src/app/eit/eit-list/eit-list.component.html
+++ b/Mohem/src/app/eit/eit-list/eit-list.component.html
@@ -122,7 +122,7 @@
-->
@@ -202,7 +202,7 @@
-->
-
+
diff --git a/Mohem/src/app/eit/eit-list/eit-list.component.ts b/Mohem/src/app/eit/eit-list/eit-list.component.ts
index 2576093b..5b43290c 100644
--- a/Mohem/src/app/eit/eit-list/eit-list.component.ts
+++ b/Mohem/src/app/eit/eit-list/eit-list.component.ts
@@ -19,27 +19,26 @@ export class EitListComponent implements OnInit {
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
- IsReachEnd: boolean = false;
+ IsReachEnd = false;
userName: any;
- isDelete: boolean = false;
+ isDelete = false;
getResEITTransactionList: any = [];
eitAddedList: any = [];
getPassMnuEntryObj: any;
selMenu: MenuResponse = new MenuResponse();
- //getMenuResponse :MenuResponse=new MenuResponse
EITTransactionsListObj: EITTransactionsRequest = new EITTransactionsRequest();
selEmp: string;
respID: number;
- transactionNo: number = 0;
- menuType: string = "";
- private functionName: string = "";
+ transactionNo = 0;
+ menuType = '';
+ public functionName = '';
private eitRequest: EitRequest;
private eitTransactionTbl: any = [];
private validEitTransactionTbl: any = [];
- private desxFlexCode: string = "";
+ private desxFlexCode = '';
private selectedIndex: number;
- private pAction: number = 0;
- public headerTitle: string = "";
+ private pAction = 0;
+ public headerTitle = '';
data: any;
accrualNetInfants: any;
accrualUNetChild: any;
@@ -49,15 +48,16 @@ export class EitListComponent implements OnInit {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
- gaugeType = "full";
+ gaugeType = 'full';
accrualBalancesList: any;
common: any;
direction: string;
// gaugeValue = 11.200;
// gaugeLabel = "";
- constructor(private cs: CommonService, private EITService: EitService, private ts: TranslatorService, private modalCtrl: ModalController) {
- this.direction = TranslatorService.getCurrentLanguageName()
+ // tslint:disable-next-line: max-line-length
+ constructor(private cs: CommonService, private EITService: EitService, public ts: TranslatorService, private modalCtrl: ModalController) {
+ this.direction = TranslatorService.getCurrentLanguageName();
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
@@ -65,32 +65,31 @@ export class EitListComponent implements OnInit {
this.menuType = this.selMenu.List_Menu.MENU_TYPE;
this.transactionNo = 0;
this.functionName = this.getPassMnuEntryObj.FUNCTION_NAME;
- console.log("fN>>>>>>>>>>>>>>>>>"+this.functionName);
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
this.validEitTransactionTbl = [];
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
}
- ngOnInit() {
+ ngOnInit() {
this.getEITTransactions();
this.accrualBalancesList = this.cs.sharedService.getSharedData('tickitsbalance', false);
// accrualNetInfants
// accrualUNetChild
// accrualNetAdult
- this.accrualNetAdult = this.accrualBalancesList[1].ACCRUAL_NET_ENTITLEMENT;
- this.accrualUNetChild = this.accrualBalancesList[2].ACCRUAL_NET_ENTITLEMENT;
- this. accrualNetInfants= this.accrualBalancesList[3].ACCRUAL_NET_ENTITLEMENT;
-
+ this.accrualNetAdult = this.accrualBalancesList[1].ACCRUAL_NET_ENTITLEMENT;
+ this.accrualUNetChild = this.accrualBalancesList[2].ACCRUAL_NET_ENTITLEMENT;
+ this. accrualNetInfants = this.accrualBalancesList[3].ACCRUAL_NET_ENTITLEMENT;
+
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNetInfants, this.accrualUNetChild, this.accrualNetAdult],
backgroundColor: [
'#1FA269',
- '#22C6B3',
- '#3CB9D5',],
+ '#22C6B3',
+ '#3CB9D5', ],
borderWidth: 2
}
]
@@ -98,7 +97,7 @@ export class EitListComponent implements OnInit {
}
getEITTransactions() {
- console.log("jkfdjkdfsffjhfsdahffg");
+ console.log('jkfdjkdfsffjhfsdahffg');
this.IsReachEnd = false;
this.EITTransactionsListObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.EITTransactionsListObj.P_PAGE_NUM = this.P_PAGE_NUM;
@@ -118,9 +117,10 @@ export class EitListComponent implements OnInit {
this.getResEITTransactionList = result.GetEITTransactionList;
this.P_PAGE_NUM++;
this.EITTransactionsListObj.P_PAGE_NUM = this.P_PAGE_NUM;
- let lastItemIndex = this.getResEITTransactionList.length - 1;
+ const lastItemIndex = this.getResEITTransactionList.length - 1;
if (result.GetEITTransactionList[lastItemIndex] && result.GetEITTransactionList[lastItemIndex].Collection_Transaction[0]) {
- let lastitem = result.GetEITTransactionList[lastItemIndex].Collection_Transaction[0];
+ const lastitem = result.GetEITTransactionList[lastItemIndex].Collection_Transaction[0];
+ // tslint:disable-next-line: triple-equals
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
@@ -155,31 +155,33 @@ export class EitListComponent implements OnInit {
this.IsReachEnd = true;
}
}
- //this.P_PAGE_NUM++;
- if (infiniteScroll)
+ // this.P_PAGE_NUM++;
+ if (infiniteScroll) {
infiniteScroll.target.complete();
+ }
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
} else {
- if (infiniteScroll)
+ if (infiniteScroll) {
infiniteScroll.target.complete();
+ }
}
}
- addEITRrq(i) {
+ addEITRrq(i?) {
this.pAction = EIT_ACTION.ADD;
// this.sharedData.setSharedData(this.getResEITTransactionList[i].Collection_Transaction,EITTransactionsRequest.SHARED_DATA);
this.cs.sharedService.setSharedData(this.pAction, EITTransactionsRequest.SUBMIT_EIT_ACTION);
// this.navCtrl.push("AddEitPage");
- //this.openEit(i);
+ // this.openEit(i);
this.openEitNew(i);
}
updateEITRrq(i) {
this.pAction = EIT_ACTION.UPDATE;
this.cs.sharedService.setSharedData(this.getResEITTransactionList[i].Collection_Transaction, EITTransactionsRequest.SHARED_DATA);
this.cs.sharedService.setSharedData(this.pAction, EITTransactionsRequest.SUBMIT_EIT_ACTION);
- //this.fillEitTransactionTable(i);
- //this.navCtrl.push("AddEitPage");
- //this.openEit(i);
+ // this.fillEitTransactionTable(i);
+ // this.navCtrl.push("AddEitPage");
+ // this.openEit(i);
this.openEitNew(i);
}
deleteEIT(i) {
@@ -193,21 +195,22 @@ export class EitListComponent implements OnInit {
}
deleteEITRrq(i) {
- let list: any = this.getResEITTransactionList[i];
+ const list: any = this.getResEITTransactionList[i];
+ // tslint:disable-next-line: triple-equals
if (list.statusID != 2) {
this.selectedIndex = i;
// if(this.transactionNo==0)
this.transactionNo++;
this.pAction = EIT_ACTION.DELETE;
- //this.sharedData.setSharedData(this.getResEITTransactionList[i].Collection_Transaction,EITTransactionsRequest.SHARED_DATA);
+ // this.sharedData.setSharedData(this.getResEITTransactionList[i].Collection_Transaction,EITTransactionsRequest.SHARED_DATA);
// this.sharedData.setSharedData(EIT_ACTION.DELETE,EITTransactionsRequest.SUBMIT_EIT_ACTION);
this.fillEitTransactionTable(i);
this.validateEITTransaction();
// this.submitEit();
- //this.navCtrl.push("AddEitPage");
+ // this.navCtrl.push("AddEitPage");
} else {
- let msg: string = "";
- msg = this.ts.trPK("general", "attemptDel");
+ let msg = '';
+ msg = this.ts.trPK('general', 'attemptDel');
this.cs.presentAlert(msg);
// alert("You are attempting to delete a row that has already been deleted.");
@@ -215,19 +218,24 @@ export class EitListComponent implements OnInit {
}
openEitNew(index) {
let item: any = [];
- if (this.pAction == EIT_ACTION.UPDATE)
+ if (this.pAction == EIT_ACTION.UPDATE) {
item = this.getResEITTransactionList[index].Collection_Transaction;
+ }
this.transactionNo++;
- this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData')
+ // tslint:disable-next-line: max-line-length
+ this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData');
this.cs.openAddEitPage();
// this.navCtrl.push('AddEitPage', { dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo });
}
async openEit(index) {
let item: any = [];
- if (this.pAction == EIT_ACTION.UPDATE)
+ // tslint:disable-next-line: triple-equals
+ if (this.pAction == EIT_ACTION.UPDATE) {
item = this.getResEITTransactionList[index].Collection_Transaction;
+ }
this.transactionNo++;
- this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData')
+ // tslint:disable-next-line: max-line-length
+ this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData');
const modalPage = await this.modalCtrl.create({
component: AddEitComponent
});
@@ -237,26 +245,29 @@ export class EitListComponent implements OnInit {
.then((data: any) => {
if (data) {
// this.transactionNo++;
- //this.updatedData=this.updatedData?this.updatedData.concat(data.updated):data.updated;
+ // this.updatedData=this.updatedData?this.updatedData.concat(data.updated):data.updated;
// this.notificationBodyRes[index].Collection_Transaction=data.updated;
this.selectedIndex = index;
this.desxFlexCode = data.eitRequest.P_DESC_FLEX_CONTEXT_CODE;
+ // tslint:disable-next-line: triple-equals
if (this.pAction == EIT_ACTION.ADD) {
index = this.eitAddedList.length + 1;
- let status = this.ts.trPK("eit", ".added");
- let statusID = EIT_ACTION.ADD;
- let obj = { status: status, statusID: statusID, Collection_Transaction: data.updated };
+ const status = this.ts.trPK('eit', '.added');
+ const statusID = EIT_ACTION.ADD;
+ const obj = { status, statusID, Collection_Transaction: data.updated };
this.eitAddedList.push(obj);
} else {
- let status = this.ts.trPK("eit", ".updated");
- let statusID = EIT_ACTION.UPDATE;
+ const status = this.ts.trPK('eit', '.updated');
+ const statusID = EIT_ACTION.UPDATE;
this.getResEITTransactionList[this.selectedIndex].status = status;
this.getResEITTransactionList[this.selectedIndex].statusID = statusID;
}
this.updateTransactionList(data.eitRequest.EITTransactionTBL, false);
} else {
- if (this.transactionNo != 0)
+ // tslint:disable-next-line: triple-equals
+ if (this.transactionNo != 0) {
this.transactionNo--;
+ }
}
});
@@ -291,14 +302,18 @@ export class EitListComponent implements OnInit {
}
fillEitTransactionTable(index) {
- var obj = { peiObjVer: null, peiExtraInfoID: null };
- let list: any = this.getResEITTransactionList[index].Collection_Transaction;
+ let obj = { peiObjVer: null, peiExtraInfoID: null };
+ const list: any = this.getResEITTransactionList[index].Collection_Transaction;
let valuseArr: any = [];
+ // tslint:disable-next-line: prefer-for-of
for (let i = 0; i < list.length; i++) {
- let item = list[i];
- if (item.APPLICATION_COLUMN_NAME != "PEI_ACTION" && item.APPLICATION_COLUMN_NAME != "PEI_EXTRA_INFO_ID" && item.APPLICATION_COLUMN_NAME != "PEI_OBJECT_VERSION_NUMBER") {
+ const item = list[i];
+ // tslint:disable-next-line: triple-equals
+ // tslint:disable-next-line: max-line-length
+ if (item.APPLICATION_COLUMN_NAME != 'PEI_ACTION' && item.APPLICATION_COLUMN_NAME != 'PEI_EXTRA_INFO_ID' && item.APPLICATION_COLUMN_NAME != 'PEI_OBJECT_VERSION_NUMBER') {
this.desxFlexCode = item.DESC_FLEX_CONTEXT_CODE;
- if (item.DATE_VALUE == "") {
+ // tslint:disable-next-line: triple-equals
+ if (item.DATE_VALUE == '') {
item.DATE_VALUE = null;
}
valuseArr.push(
@@ -309,17 +324,19 @@ export class EitListComponent implements OnInit {
NUMBER_VALUE: item.NUMBER_VALUE,
DATE_VALUE: item.DATE_VALUE,
}
- )
+ );
} else {
- if (item.APPLICATION_COLUMN_NAME == "PEI_OBJECT_VERSION_NUMBER")
+ if (item.APPLICATION_COLUMN_NAME == 'PEI_OBJECT_VERSION_NUMBER') {
obj.peiObjVer = item.NUMBER_VALUE;
- else if (item.APPLICATION_COLUMN_NAME == "PEI_EXTRA_INFO_ID")
+ }
+ else if (item.APPLICATION_COLUMN_NAME == 'PEI_EXTRA_INFO_ID') {
obj.peiExtraInfoID = item.NUMBER_VALUE;
+ }
}
- }// end for
- //}
- valuseArr = this.fillExtraInformation(valuseArr, "DELETE_ROW", obj.peiExtraInfoID, obj.peiObjVer, this.transactionNo);
+ }// end for
+ // }
+ valuseArr = this.fillExtraInformation(valuseArr, 'DELETE_ROW', obj.peiExtraInfoID, obj.peiObjVer, this.transactionNo);
this.eitTransactionTbl = valuseArr;
}
@@ -327,7 +344,7 @@ export class EitListComponent implements OnInit {
values.push(
{
TRANSACTION_NUMBER: transNo,
- NAME: "PEI_ACTION",
+ NAME: 'PEI_ACTION',
VARCHAR2_VALUE: peiAction,
NUMBER_VALUE: null,
DATE_VALUE: null
@@ -335,7 +352,7 @@ export class EitListComponent implements OnInit {
values.push(
{
TRANSACTION_NUMBER: transNo,
- NAME: "PEI_EXTRA_INFO_ID",
+ NAME: 'PEI_EXTRA_INFO_ID',
VARCHAR2_VALUE: null,
NUMBER_VALUE: peiExtraInfoID,
DATE_VALUE: null
@@ -343,7 +360,7 @@ export class EitListComponent implements OnInit {
values.push(
{
TRANSACTION_NUMBER: transNo,
- NAME: "PEI_OBJECT_VERSION_NUMBER",
+ NAME: 'PEI_OBJECT_VERSION_NUMBER',
VARCHAR2_VALUE: null,
NUMBER_VALUE: peiObjVer,
DATE_VALUE: null
@@ -354,11 +371,11 @@ export class EitListComponent implements OnInit {
submitEit() {
this.eitRequest = new EitRequest();
- let list: any = this.fixTransactionNo();
+ const list: any = this.fixTransactionNo();
this.eitRequest.EITTransactionTBL = list;
this.eitRequest.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
this.eitRequest.P_MENU_TYPE = this.menuType;
- this.eitRequest.P_SELECTED_RESP_ID = this.respID;//this.selMenu.List_Menu.RESP_ID,//-999,
+ this.eitRequest.P_SELECTED_RESP_ID = this.respID; // this.selMenu.List_Menu.RESP_ID,//-999,
this.eitRequest.P_FUNCTION_NAME = this.functionName;
this.eitRequest.P_DESC_FLEX_CONTEXT_CODE = this.desxFlexCode;
@@ -370,14 +387,14 @@ export class EitListComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.cs.sharedService.setSharedData(this.eitRequest, EitRequest.SHARED_DATA);
this.cs.sharedService.setSharedData(result, AddEitResponse.SHARED_DATA);
- //this.addrespList=result.SubmitEITTransactionList;
+ // this.addrespList=result.SubmitEITTransactionList;
// this.itemKey=this.addrespList.P_ITEM_KEY;
// this.P_TransactionID=result.SubmitEITTransactionList.P_TRANSACTION_ID;
// this.sharedData.setSharedData(result,AddEitResponse.SHARED_DATA);
// //this.cs.sharedService.setSharedData(result.SubmitEITTransactionList.P_TRANSACTION_ID,"TransactionIDResubmit");
// // this.sharedData.setSharedData(this.eitRequest,EitRequest.SHARED_DATA);
- this.cs.sharedService.setSharedData({ isResubmit: false, isDelete: this.isDelete }, 'confirmAddEITData')
+ this.cs.sharedService.setSharedData({ isResubmit: false, isDelete: this.isDelete }, 'confirmAddEITData');
this.cs.openConfirmEitPage();
// this.navCtrl.push("ConfirmAddEitPage", { isResubmit: false, isDelete: this.isDelete });
}
@@ -391,7 +408,7 @@ export class EitListComponent implements OnInit {
P_FUNCTION_NAME: this.functionName,
P_DESC_FLEX_CONTEXT_CODE: this.desxFlexCode,
EITTransactionTBL: this.eitTransactionTbl
- }
+ };
this.EITService.validateEITTransaction(this.eitRequest).subscribe((result: any) => {
this.handleEITValidateTr(result);
@@ -400,22 +417,23 @@ export class EitListComponent implements OnInit {
private handleEITValidateTr(result) {
if (this.cs.validResponse(result)) {
// public static SHARED_DATA = 'login-request';
- //this.sharedData.setSharedData(this.eitRequest, EitRequest.SHARED_DATA);
- let status = this.ts.trPK("eit", ".deleted");
- let statusID = EIT_ACTION.DELETE;
+ // this.sharedData.setSharedData(this.eitRequest, EitRequest.SHARED_DATA);
+ const status = this.ts.trPK('eit', '.deleted');
+ const statusID = EIT_ACTION.DELETE;
this.isDelete = true;
this.getResEITTransactionList[this.selectedIndex].status = status;
this.getResEITTransactionList[this.selectedIndex].statusID = statusID;
this.updateTransactionList(this.eitTransactionTbl, false);
this.submitEit();
} else {
- if (this.transactionNo != 0)
+ if (this.transactionNo != 0) {
this.transactionNo--;
+ }
}
}
updateTransactionList(list, isRemove) {
- //let newlist = this.validEitTransactionTbl.map(a => a.NAME='PEI_EXTRA_INFO_ID');
- let isAnewRow: boolean = false;
+ // let newlist = this.validEitTransactionTbl.map(a => a.NAME='PEI_EXTRA_INFO_ID');
+ let isAnewRow = false;
let updateDelTransNo: number;
if (this.cs.hasData(this.validEitTransactionTbl)) {
this.validEitTransactionTbl.forEach(element => {
@@ -429,42 +447,45 @@ export class EitListComponent implements OnInit {
}
list.forEach(element => {
// NAME=PEI_EXTRA_INFO_ID
- //const index = this.validEitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
+ // const index = this.validEitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
// let newlist = this.validEitTransactionTbl.map(a => a.NAME==='PEI_EXTRA_INFO_ID');
if (isAnewRow == true) {
- let index: number = this.validEitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
- //if(index!=-1)
- //this.validEitTransactionTbl.splice(index, 1);
+ const index: number = this.validEitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
+ // if(index!=-1)
+ // this.validEitTransactionTbl.splice(index, 1);
} else {
- let index: number = this.validEitTransactionTbl.findIndex(x => x.NAME === 'PEI_EXTRA_INFO_ID' && x.NUMBER_VALUE === element.NUMBER_VALUE);
+ const index: number = this.validEitTransactionTbl.findIndex(x => x.NAME === 'PEI_EXTRA_INFO_ID' && x.NUMBER_VALUE === element.NUMBER_VALUE);
if (index != -1) {
- //this.validEitTransactionTbl.splice(index, 1);
- if (!updateDelTransNo)
+ // this.validEitTransactionTbl.splice(index, 1);
+ if (!updateDelTransNo) {
updateDelTransNo = this.validEitTransactionTbl[index].TRANSACTION_NUMBER;
+ }
}
}
});
- if (updateDelTransNo)
+ if (updateDelTransNo) {
this.removeItems(updateDelTransNo);
- if (isRemove == false)
+ }
+ if (isRemove == false) {
this.validEitTransactionTbl = this.validEitTransactionTbl ? this.validEitTransactionTbl.concat(list) : list;
+ }
}
fixTransactionNo(): any[] {
- let list: any = [];
- let newIndex: number = 1;
- let length: number = this.validEitTransactionTbl.length;
+ const list: any = [];
+ let newIndex = 1;
+ const length: number = this.validEitTransactionTbl.length;
for (let i = 0; i < length; i++) {
// let item :any={};
const item = Object.assign({}, this.validEitTransactionTbl[i]);
- let transNo: number = item.TRANSACTION_NUMBER;
- let obj: any = item;
+ const transNo: number = item.TRANSACTION_NUMBER;
+ const obj: any = item;
if (i == 0) {
obj.TRANSACTION_NUMBER = newIndex;
list.push(obj);
} else {
- let prevEl: any = this.validEitTransactionTbl[i - 1].TRANSACTION_NUMBER;
+ const prevEl: any = this.validEitTransactionTbl[i - 1].TRANSACTION_NUMBER;
if (transNo == prevEl) {
obj.TRANSACTION_NUMBER = newIndex;
list.push(obj);
@@ -478,19 +499,21 @@ export class EitListComponent implements OnInit {
return list;
}
removeItems(transNo) {
- let list = [];
+ const list = [];
for (let i = 0; i < this.validEitTransactionTbl.length; i++) {
- if (this.validEitTransactionTbl[i].TRANSACTION_NUMBER != transNo)
+ if (this.validEitTransactionTbl[i].TRANSACTION_NUMBER != transNo) {
list.push(this.validEitTransactionTbl[i]);
+ }
}
this.validEitTransactionTbl = list;
}
removeAddedItem(index) {
- let list = [];
+ const list = [];
let item: any = [];
for (let i = 0; i < this.eitAddedList.length; i++) {
- if (i != index)
+ if (i != index) {
list.push(this.eitAddedList[i]);
+ }
}
item = this.eitAddedList[index];
this.eitAddedList = list;
diff --git a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html
index 5c562226..5ea12523 100644
--- a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html
+++ b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html
@@ -1,5 +1,5 @@
-
diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts
index 314dd5a9..60dfc34f 100644
--- a/Mohem/src/app/home/home.page.ts
+++ b/Mohem/src/app/home/home.page.ts
@@ -249,7 +249,7 @@ export class HomePage implements OnInit {
this.attendance();
})
.catch(error => {
- console.log('Error getting location', error);
+ this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
} else {
return false;
@@ -283,18 +283,6 @@ export class HomePage implements OnInit {
// });
// }
- ionViewDidEnter() {
- this.geolocation
- .getCurrentPosition()
- .then(resp => {
- this.lat = resp.coords.latitude;
- this.longt = resp.coords.longitude;
- })
- .catch(error => {
- console.log('Error getting location', error);
- });
- }
-
private openMenu() {
this.menu.toggle();
}
@@ -331,7 +319,6 @@ export class HomePage implements OnInit {
this.showOpenMissingSwipes();
this.showAttendanceTracking();
this.getAccrualBalance();
- // this.common.stopLoading();
}
public Vacation_Rule() {
@@ -372,6 +359,7 @@ export class HomePage implements OnInit {
for (let i = 0; i < this.menuList.length; i++) {
if (this.menuList[i].MENU_TYPE === 'M') {
this.events.publish('myTeamFlag', 'true');
+ // this.common.sharedService.setSharedData('true', "myTeamFlag");
}
}
@@ -487,9 +475,11 @@ export class HomePage implements OnInit {
this.barcodeScanner
.scan()
.then(barcodeData => {
- this.scannedResult = barcodeData;
- this.deviceID = this.device.uuid;
- this.swipeAttendance();
+ if (!barcodeData.cancelled) {
+ this.scannedResult = barcodeData;
+ this.deviceID = this.device.uuid;
+ this.swipeAttendance();
+ }
})
.catch(err => {
console.log('Error', err);
diff --git a/Mohem/src/app/my-specialist/home/home.component.ts b/Mohem/src/app/my-specialist/home/home.component.ts
index d820bbaf..ea4bf9f2 100644
--- a/Mohem/src/app/my-specialist/home/home.component.ts
+++ b/Mohem/src/app/my-specialist/home/home.component.ts
@@ -133,7 +133,7 @@ export class HomeComponent implements OnInit {
}
}
- private getSpecialistInfo(i) {
+ public getSpecialistInfo(i) {
// this.navCtrl.push("MyTeamPage", { employee: this.specialistEmpList[i], isSpecialist: true });
this.cs.sharedService.setSharedData(this.specialistEmpList[i], MyTeamService.EMPLOYEE_SHARED_DATA);
this.cs.sharedService.setSharedData(true, 'isSpecialist');
diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html
index af154d2f..0fb04cdb 100644
--- a/Mohem/src/app/my-team/details/details.component.html
+++ b/Mohem/src/app/my-team/details/details.component.html
@@ -159,7 +159,7 @@
{{ts.trPK('attendance-tracking','non-analyzed')}}
-
{{timeCardSummaryData.UNAUTHORIZED_LEAVE}}
+ {{timeCardSummaryData.NOT_ANALYZED_DAYS}}
diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts
index a5e58229..087df5da 100644
--- a/Mohem/src/app/my-team/details/details.component.ts
+++ b/Mohem/src/app/my-team/details/details.component.ts
@@ -75,7 +75,7 @@ export class DetailsComponent implements OnInit {
};
public data = {};
-
+ public isPostNoLoad = true;
public previousActiveIndex = 0;
public currentActiveIndex = 0;
public searchNameOrUserName = '';
@@ -96,11 +96,13 @@ export class DetailsComponent implements OnInit {
) { }
ngOnInit() {
+ this.common.startLoading();
this.intializeMemberDetail();
this.showAttendanceTracking();
}
showAttendanceTracking() {
+ this.common.startLoading();
this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false);
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER
@@ -116,6 +118,7 @@ export class DetailsComponent implements OnInit {
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
if (this.activeSegment === 'Attendance') {
+ this.common.startLoading();
this.initAttendance();
}
}
@@ -139,7 +142,6 @@ export class DetailsComponent implements OnInit {
}
public getDayHoursTypeDetails(month?, year?) {
- console.log('getDayHoursTypeDetails');
const dayAndHoursReqObj = new GetDayAndHoursDetailsRequest();
this.monthName = month;
this.yearDate = year;
@@ -156,17 +158,17 @@ export class DetailsComponent implements OnInit {
dayAndHoursReqObj.P_PAGE_NUM = this.dayAndHoursPageNumber;
dayAndHoursReqObj.P_PAGE_LIMIT = 100;
- this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj).subscribe((result) => {
+ this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) {
console.log(result.GetDayHoursTypeDetailsList);
this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs');
this.countAllAttendDays(result.GetDayHoursTypeDetailsList);
}
});
-
}
nextSlide() {
+ this.common.startLoading();
if (this.currentMonthName !== this.month) {
this.showData = false;
if (this.nextMonth > 12) {
@@ -181,6 +183,7 @@ export class DetailsComponent implements OnInit {
}
previousSlide() {
+ this.common.startLoading();
this.showData = false;
if (this.preMonth === 0) {
this.currentYear = this.currentYear - 1;
@@ -255,17 +258,11 @@ export class DetailsComponent implements OnInit {
timeCardSummaryReqObj.SearchMonth = this.monthName;
timeCardSummaryReqObj.SearchYear = this.yearDate;
- this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj).subscribe((result) => {
+ this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) {
-
this.timeCardSummaryData = result.GetTimeCardSummaryList[0];
this.absentDays = this.timeCardSummaryData.ABSENT_DAYS;
this.attendedDays = this.timeCardSummaryData.ATTENDED_DAYS;
-
- // this.totalAttendancePrecentage = this.timeCardSummaryData.PERIOD_DAYS - this.timeCardSummaryData.OFF_DAYS;
- // if (this.absentDays === 0 && this.attendedDays === 0) {
- // this.futrueDays = this.totalAttendancePrecentage;
- // }
this.totalAttendancePrecentage = this.absentDays + this.attendedDays;
if (this.totalAttendancePrecentage > 0) {
this.data = {
diff --git a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
index 7750f3d9..43ea2773 100644
--- a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
+++ b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
@@ -25,7 +25,7 @@ export class ApplyActionModalComponent implements OnInit {
messageSuccess: boolean;
- constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
+ constructor( public ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo',false);
diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html
index d24f510f..e2a26be5 100644
--- a/Mohem/src/app/notification/home/home.component.html
+++ b/Mohem/src/app/notification/home/home.component.html
@@ -25,7 +25,7 @@