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

@ -45,3 +45,10 @@
text-align: left; text-align: left;
display: block; 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() icon: string;
@Input() title: string; @Input() title: string;
@Input() statsValue: string; @Input() statsValue: string;
@Input() link: string;
@Output() trigger = new EventEmitter(); @Output() trigger = new EventEmitter();
@Input() focusicon: string; @Input() focusicon: string;
@Input() disabled = false; @Input() disabled = false;

@ -15,6 +15,7 @@
[statsValue]="button.statsValue" [statsValue]="button.statsValue"
[icon]="button.icon" [icon]="button.icon"
[show]="button.show" [show]="button.show"
[link]="button.link"
(click)="openStatsButton(button.link)"> (click)="openStatsButton(button.link)">
</app-stats-button> </app-stats-button>
</ion-slide> </ion-slide>
@ -84,7 +85,7 @@
[renderOnClick]="false"> [renderOnClick]="false">
</circle-progress> </circle-progress>
</div> </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> <fab-button (trigger)="getDeviceLocation()"></fab-button>
<page-trailer [small] = "true"></page-trailer> <page-trailer [small] = "true"></page-trailer>
</div> </div> -->

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

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

Loading…
Cancel
Save