|
|
|
|
@ -62,6 +62,11 @@ export class HomePage implements OnInit {
|
|
|
|
|
public isShow = false;
|
|
|
|
|
public showVcationRule = false;
|
|
|
|
|
public statsButtons = [
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('attendance-tracking', 'title'),
|
|
|
|
|
link: '0',
|
|
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('home','worklist'),
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
@ -69,12 +74,6 @@ export class HomePage implements OnInit {
|
|
|
|
|
link: '1',
|
|
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// title: 'Pending Request',
|
|
|
|
|
// statsValue: 13,
|
|
|
|
|
// icon: 'assets/icon/new-design/pending_request.png',
|
|
|
|
|
// link: ''
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('home','missing-swipes'),
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
@ -281,8 +280,8 @@ export class HomePage implements OnInit {
|
|
|
|
|
for (const servicePrivilage of AuthenticationService.servicePrivilage) {
|
|
|
|
|
if (servicePrivilage.Previlege === false) {
|
|
|
|
|
if(servicePrivilage.ServiceName === 'accrualBalance'){
|
|
|
|
|
this.statsButtons[2].show = false;
|
|
|
|
|
this.statsButtons[3].show = false;
|
|
|
|
|
this.statsButtons[4].show = false;
|
|
|
|
|
}
|
|
|
|
|
if(servicePrivilage.ServiceName === 'vacationRule'){
|
|
|
|
|
this.showVcationRule = false;
|
|
|
|
|
@ -293,8 +292,8 @@ export class HomePage implements OnInit {
|
|
|
|
|
// document.getElementById(servicePrivilage.ServiceName).style.filter =
|
|
|
|
|
// 'grayscale(1)';
|
|
|
|
|
}else{
|
|
|
|
|
this.statsButtons[2].show = true;
|
|
|
|
|
this.statsButtons[3].show = true;
|
|
|
|
|
this.statsButtons[4].show = true;
|
|
|
|
|
this.showVcationRule = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -555,7 +554,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
(result: OpenMissingSwipesResponse) => {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
const key = 'GetOpenMissingSwipesList';
|
|
|
|
|
this.statsButtons[1].statsValue = Math.floor(result[key].P_OPEN_MISSING_SWIPES);
|
|
|
|
|
this.statsButtons[2].statsValue = Math.floor(result[key].P_OPEN_MISSING_SWIPES);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
@ -623,7 +622,7 @@ openPeriodDateDashbored() {
|
|
|
|
|
|
|
|
|
|
ITGCountAllNotification() {
|
|
|
|
|
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
|
|
|
|
|
this.statsButtons[0].statsValue =
|
|
|
|
|
this.statsButtons[1].statsValue =
|
|
|
|
|
Math.floor(this.countAllNotification + result.TotalCount);
|
|
|
|
|
this.common.stopLoading();
|
|
|
|
|
});
|
|
|
|
|
@ -701,7 +700,7 @@ getSubordinatesAttStatus() {
|
|
|
|
|
this.accrualBalancesList = result.GetAccrualBalancesList;
|
|
|
|
|
for (const accrualBalance of result.GetAccrualBalancesList) {
|
|
|
|
|
if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') {
|
|
|
|
|
this.statsButtons[2].statsValue =
|
|
|
|
|
this.statsButtons[3].statsValue =
|
|
|
|
|
Math.floor(accrualBalance.ACCRUAL_NET_ENTITLEMENT);
|
|
|
|
|
this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance');
|
|
|
|
|
this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate');
|
|
|
|
|
@ -710,7 +709,7 @@ getSubordinatesAttStatus() {
|
|
|
|
|
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.statsButtons[3].statsValue = Math.floor(totalTicketsLeft);
|
|
|
|
|
this.statsButtons[4].statsValue = Math.floor(totalTicketsLeft);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -721,7 +720,10 @@ openattentracking() {
|
|
|
|
|
|
|
|
|
|
openStatsButton(link: any) {
|
|
|
|
|
// tslint:disable-next-line: triple-equals
|
|
|
|
|
if (link == '1') {
|
|
|
|
|
if (link == '0') {
|
|
|
|
|
this.getDeviceLocation();
|
|
|
|
|
// tslint:disable-next-line: triple-equals
|
|
|
|
|
} else if (link == '1') {
|
|
|
|
|
this.common.startLoading();
|
|
|
|
|
this.common.openNotificationPage();
|
|
|
|
|
// tslint:disable-next-line: triple-equals
|
|
|
|
|
|