|
|
|
|
@ -97,15 +97,15 @@ export class HomePage implements OnInit {
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
icon: 'assets/icon/new-design/leave_balance.png',
|
|
|
|
|
link: '3',
|
|
|
|
|
show: this.isShow,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('absenceList', 'tickets-balance'),
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
icon: 'assets/icon/new-design/ticket_balance.png',
|
|
|
|
|
link: '4',
|
|
|
|
|
show: this.isShow
|
|
|
|
|
show: true,
|
|
|
|
|
}
|
|
|
|
|
// {
|
|
|
|
|
// title: this.ts.trPK('absenceList', 'tickets-balance'),
|
|
|
|
|
// statsValue: 0,
|
|
|
|
|
// icon: 'assets/icon/new-design/ticket_balance.png',
|
|
|
|
|
// link: '4',
|
|
|
|
|
// show: this.isShow
|
|
|
|
|
// }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public slideOptsOne = {};
|
|
|
|
|
@ -383,9 +383,10 @@ export class HomePage implements OnInit {
|
|
|
|
|
|
|
|
|
|
//this.showOpenMissingSwipes();
|
|
|
|
|
//this.showAttendanceTracking();
|
|
|
|
|
//var accrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
|
|
|
|
|
// if (!accrualBalance)
|
|
|
|
|
this.getAccrualBalance();
|
|
|
|
|
var accrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
|
|
|
|
|
if (!accrualBalance) {
|
|
|
|
|
this.getAccrualBalance();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Vacation_Rule() {
|
|
|
|
|
@ -488,6 +489,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
this.eitService
|
|
|
|
|
.getMenuEntries(request, '', '', this.isPostNoLoad)
|
|
|
|
|
.subscribe((result: MenuResponse) => {
|
|
|
|
|
this.common.stopLoading();
|
|
|
|
|
this.handleMenuEntiresResult(result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -510,7 +512,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_TKT_NEW_EIT_SS') {
|
|
|
|
|
this.ticketRequestObject = result.GetMenuEntriesList[i];
|
|
|
|
|
// tslint:disable-next-line: triple-equals
|
|
|
|
|
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HR_LOA_SS') {
|
|
|
|
|
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'XXX_HR_EIT_LOA_CREATE_SS') {
|
|
|
|
|
this.leaveRequestObject = result.GetMenuEntriesList[i];
|
|
|
|
|
// tslint:disable-next-line: triple-equals
|
|
|
|
|
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') {
|
|
|
|
|
@ -671,6 +673,9 @@ export class HomePage implements OnInit {
|
|
|
|
|
const key = 'P_OPEN_NTF_NUMBER';
|
|
|
|
|
this.countAllNotification = result[key];
|
|
|
|
|
this.statsButtons[0].statsValue = this.countAllNotification;
|
|
|
|
|
this.common.sharedService.setSharedData(this.statsButtons[0].statsValue, 'total-count');
|
|
|
|
|
console.log(this.common.sharedService.getSharedData('total-count', false));
|
|
|
|
|
console.log(this.common.getTotalNumberOfWorklistRequest());
|
|
|
|
|
this.common.stopLoading();
|
|
|
|
|
//this.ITGCountAllNotification();
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
@ -778,7 +783,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
);
|
|
|
|
|
selMenu.GetMenuEntriesList = subMenu;
|
|
|
|
|
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
|
|
|
|
|
if (subMenu.REQUEST_TYPE === 'ABSENCE') {
|
|
|
|
|
if (subMenu.REQUEST_TYPE === 'EIT' && subMenu.FUNCTION_NAME === 'XXX_HR_EIT_LOA_CREATE_SS') {
|
|
|
|
|
this.common.openAbsencePage();
|
|
|
|
|
} else if (subMenu.REQUEST_TYPE === 'EIT') {
|
|
|
|
|
this.common.openEitListPage();
|
|
|
|
|
@ -818,16 +823,17 @@ export class HomePage implements OnInit {
|
|
|
|
|
let totalTicketsLeft = 0;
|
|
|
|
|
this.accrualBalancesList = result.GetAccrualBalancesList;
|
|
|
|
|
for (const accrualBalance of result.GetAccrualBalancesList) {
|
|
|
|
|
if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') {
|
|
|
|
|
this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
|
|
|
|
|
if (accrualBalance.ACCURAL_PLAN_NAME === 'Annual Vacation Accrual') {
|
|
|
|
|
this.statsButtons[1].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
|
|
|
|
|
this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance');
|
|
|
|
|
this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate');
|
|
|
|
|
this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance');
|
|
|
|
|
} else {
|
|
|
|
|
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
|
|
|
|
|
// this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance');
|
|
|
|
|
}
|
|
|
|
|
// else {
|
|
|
|
|
// totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2));
|
|
|
|
|
// this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -847,8 +853,8 @@ export class HomePage implements OnInit {
|
|
|
|
|
// this.getDeviceLocation();
|
|
|
|
|
this.showAttendanceOptions();
|
|
|
|
|
// tslint:disable-next-line: triple-equals
|
|
|
|
|
} else if (link == '1' && this.showLoader === false) {
|
|
|
|
|
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
|
|
|
|
|
} else if (link == '1') {
|
|
|
|
|
// this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
|
|
|
|
|
this.common.startLoading();
|
|
|
|
|
this.common.openNotificationPage();
|
|
|
|
|
// tslint:disable-next-line: triple-equals
|
|
|
|
|
|