|
|
|
|
@ -34,6 +34,7 @@ import { GetSubordinatesLeavesResponse } from '../hmg-common/services/dashbored/
|
|
|
|
|
import { AccrualService } from '../accrual-balances/services/accrual.service';
|
|
|
|
|
import { TimeCardService } from '../time-card/service/time-card.service';
|
|
|
|
|
import { WorklistMainService } from '../notification/service/work-list.main.service';
|
|
|
|
|
import { isThisISOWeek } from 'date-fns';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-home',
|
|
|
|
|
@ -57,12 +58,15 @@ export class HomePage implements OnInit {
|
|
|
|
|
ticketRequestObject: any;
|
|
|
|
|
leaveRequestObject: any;
|
|
|
|
|
missingSwipeRequestObject: any;
|
|
|
|
|
public isShow = false;
|
|
|
|
|
public showVcationRule = false;
|
|
|
|
|
public statsButtons = [
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('home','worklist'),
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
icon: 'assets/icon/new-design/work_list.png',
|
|
|
|
|
link: '1'
|
|
|
|
|
link: '1',
|
|
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// title: 'Pending Request',
|
|
|
|
|
@ -74,19 +78,22 @@ export class HomePage implements OnInit {
|
|
|
|
|
title: this.ts.trPK('home','missing-swipes'),
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
icon: 'assets/icon/new-design/missing_swipe.png',
|
|
|
|
|
link: '2'
|
|
|
|
|
link: '2',
|
|
|
|
|
show:true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('home','leave-balance'),
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
icon: 'assets/icon/new-design/leave_balance.png',
|
|
|
|
|
link: '3'
|
|
|
|
|
link: '3',
|
|
|
|
|
show: this.isShow,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: this.ts.trPK('absenceList','tickets-balance'),
|
|
|
|
|
statsValue: 0,
|
|
|
|
|
icon: 'assets/icon/new-design/ticket_balance.png',
|
|
|
|
|
link: '4'
|
|
|
|
|
link: '4',
|
|
|
|
|
show: this.isShow
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
@ -256,11 +263,22 @@ export class HomePage implements OnInit {
|
|
|
|
|
setServicesPrivilage() {
|
|
|
|
|
for (const servicePrivilage of AuthenticationService.servicePrivilage) {
|
|
|
|
|
if (servicePrivilage.Previlege === false) {
|
|
|
|
|
document
|
|
|
|
|
.getElementById(servicePrivilage.ServiceName)
|
|
|
|
|
.setAttribute('disabled', 'disabled');
|
|
|
|
|
document.getElementById(servicePrivilage.ServiceName).style.filter =
|
|
|
|
|
'grayscale(1)';
|
|
|
|
|
if(servicePrivilage.ServiceName === 'accrualBalance'){
|
|
|
|
|
this.statsButtons[2].show = false;
|
|
|
|
|
this.statsButtons[3].show = false;
|
|
|
|
|
}
|
|
|
|
|
if(servicePrivilage.ServiceName === 'vacationRule'){
|
|
|
|
|
this.showVcationRule = false;
|
|
|
|
|
}
|
|
|
|
|
// document
|
|
|
|
|
// .getElementById(servicePrivilage.ServiceName)
|
|
|
|
|
// .setAttribute('disabled', 'disabled');
|
|
|
|
|
// document.getElementById(servicePrivilage.ServiceName).style.filter =
|
|
|
|
|
// 'grayscale(1)';
|
|
|
|
|
}else{
|
|
|
|
|
this.statsButtons[2].show = true;
|
|
|
|
|
this.statsButtons[3].show = true;
|
|
|
|
|
this.showVcationRule = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|