|
|
|
|
@ -69,6 +69,11 @@ export class HomePage implements OnInit {
|
|
|
|
|
public isFakeLocationUsed = false;
|
|
|
|
|
public intervalCountdown: any;
|
|
|
|
|
public statsButtons = [
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('attendance-tracking', 'title'),
|
|
|
|
|
link: '0',
|
|
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('home', 'worklist'),
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
@ -292,7 +297,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
for (const servicePrivilage of AuthenticationService.servicePrivilage) {
|
|
|
|
|
if (servicePrivilage.Previlege === false) {
|
|
|
|
|
if (servicePrivilage.ServiceName === 'accrualBalance') {
|
|
|
|
|
this.statsButtons[1].show = false;
|
|
|
|
|
this.statsButtons[2].show = false;
|
|
|
|
|
// this.statsButtons[2].show = false;
|
|
|
|
|
}
|
|
|
|
|
if (servicePrivilage.ServiceName === 'vacationRule') {
|
|
|
|
|
@ -304,7 +309,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
// document.getElementById(servicePrivilage.ServiceName).style.filter =
|
|
|
|
|
// 'grayscale(1)';
|
|
|
|
|
} else {
|
|
|
|
|
this.statsButtons[1].show = true;
|
|
|
|
|
this.statsButtons[2].show = true;
|
|
|
|
|
// this.statsButtons[2].show = true;
|
|
|
|
|
this.showVcationRule = true;
|
|
|
|
|
}
|
|
|
|
|
@ -363,8 +368,8 @@ export class HomePage implements OnInit {
|
|
|
|
|
this.openNotificationsDashbored();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.showOpenMissingSwipes();
|
|
|
|
|
this.showAttendanceTracking();
|
|
|
|
|
// this.showOpenMissingSwipes();
|
|
|
|
|
// this.showAttendanceTracking();
|
|
|
|
|
var accrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
|
|
|
|
|
if (!accrualBalance)
|
|
|
|
|
this.getAccrualBalance();
|
|
|
|
|
@ -464,7 +469,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
this.eitService
|
|
|
|
|
.getMenuEntries(request, '', '', this.isPostNoLoad)
|
|
|
|
|
.getMenuEntries(request, '', '', false)
|
|
|
|
|
.subscribe((result: MenuResponse) => {
|
|
|
|
|
this.handleMenuEntiresResult(result);
|
|
|
|
|
});
|
|
|
|
|
@ -649,7 +654,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
const key = 'P_OPEN_NTF_NUMBER';
|
|
|
|
|
this.countAllNotification = result[key];
|
|
|
|
|
// this.ITGCountAllNotification();
|
|
|
|
|
this.statsButtons[0].statsValue = Math.floor(this.countAllNotification);
|
|
|
|
|
this.statsButtons[1].statsValue = Math.floor(this.countAllNotification);
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
result,
|
|
|
|
|
'worklistNotifications'
|
|
|
|
|
@ -741,7 +746,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
this.accrualBalancesList = result.GetAccrualBalancesList;
|
|
|
|
|
for (const accrualBalance of result.GetAccrualBalancesList) {
|
|
|
|
|
if (accrualBalance.ACCURAL_PLAN_NAME === 'SFHP Annual Leave Plan') {
|
|
|
|
|
this.statsButtons[1].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
|
|
|
|
|
this.statsButtons[2].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');
|
|
|
|
|
|