fixed prod issues

umar-issues
umasoodch 6 years ago
parent 5784bead37
commit 3fe4c73492

@ -1,9 +1,12 @@
<div feedback class="custom-button" *ngIf='show'>
<div class="iconBox">
<div feedback class="custom-button" *ngIf="show">
<div class="iconBox" *ngIf="link !== '0'">
<img [src]="icon" class="icon">
</div>
<div class="iconBox" *ngIf="link === '0'">
<ion-icon class="iconFab" name="finger-print"></ion-icon>
</div>
<div class="titleBox">
<span>{{statsValue}}</span>
<p class="pClass">{{title}}</p>
<span *ngIf='statsValue >= 0'>{{statsValue}}</span>
<p class="pClass" [ngStyle]="link === '0' ? {'width': '105%', 'margin-top': '12px'} : {}">{{title}}</p>
</div>
</div>

@ -45,3 +45,10 @@
text-align: left;
display: block;
}
.iconFab{
margin-left: -37px;
margin-top: 5px;
width: 80px;
height: 65px;
}

@ -13,6 +13,7 @@ export class StatsButtonComponent implements OnInit {
@Input() icon: string;
@Input() title: string;
@Input() statsValue: string;
@Input() link: string;
@Output() trigger = new EventEmitter();
@Input() focusicon: string;
@Input() disabled = false;

@ -15,6 +15,7 @@
[statsValue]="button.statsValue"
[icon]="button.icon"
[show]="button.show"
[link]="button.link"
(click)="openStatsButton(button.link)">
</app-stats-button>
</ion-slide>
@ -84,7 +85,7 @@
[renderOnClick]="false">
</circle-progress>
</div>
<div class="fixed-shift-timer" [ngClass]=" direction === 'en' ? 'fixed-shift-time-en' : 'fixed-shift-time-ar'" *ngIf="isCheckedIn === false">
<!-- <div class="fixed-shift-timer" [ngClass]=" direction === 'en' ? 'fixed-shift-time-en' : 'fixed-shift-time-ar'" *ngIf="isCheckedIn === false">
<fab-button (trigger)="getDeviceLocation()"></fab-button>
<page-trailer [small] = "true"></page-trailer>
</div>
</div> -->

@ -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

@ -959,7 +959,7 @@
},
"time-left": {
"en": "Time Left Today",
"ar": "باقي الوقت لليوم"
"ar": "الوقت المتبقي"
}
},
"work-list": {
@ -2486,7 +2486,7 @@
"attendance-tracking": {
"title": {
"en": "Mark Attendance",
"ar": "علامة الحضور "
"ar": "تسجيل الحضور والانصراف"
},
"check-in": {
"en": "Check In",

Loading…
Cancel
Save