diff --git a/Mohem/src/app/absence/home/home.component.ts b/Mohem/src/app/absence/home/home.component.ts index e0e22e86..f76a31bf 100644 --- a/Mohem/src/app/absence/home/home.component.ts +++ b/Mohem/src/app/absence/home/home.component.ts @@ -263,8 +263,8 @@ export class HomeComponent implements OnInit { this.balance = result.GetAccrualBalancesList; } if (this.balance) { - this.accrualNet = this.balance[0].ACCRUAL_NET_ENTITLEMENT; - this.accrualUsed = this.balance[0].ACCRUAL_USED_ENTITLEMENT; + this.accrualNet = this.balance[1].ACCRUAL_NET_ENTITLEMENT; + this.accrualUsed = this.balance[1].ACCRUAL_USED_ENTITLEMENT; // this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT; // this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly; this.totalnumber = this.accrualNet + this.accrualUsed; diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 14fc350c..b7e5a64f 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -89,7 +89,7 @@ --> - + - + @@ -216,7 +216,7 @@ --> - + - + + diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 4e65355e..562c27c4 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -10,9 +10,9 @@ -
+ { + this.common.stopLoading(); this.handleMenuEntiresResult(result); }); } @@ -510,7 +512,7 @@ export class HomePage implements OnInit { if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_TKT_NEW_EIT_SS') { this.ticketRequestObject = result.GetMenuEntriesList[i]; // tslint:disable-next-line: triple-equals - } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HR_LOA_SS') { + } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'XXX_HR_EIT_LOA_CREATE_SS') { this.leaveRequestObject = result.GetMenuEntriesList[i]; // tslint:disable-next-line: triple-equals } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') { @@ -671,6 +673,9 @@ export class HomePage implements OnInit { const key = 'P_OPEN_NTF_NUMBER'; this.countAllNotification = result[key]; this.statsButtons[0].statsValue = this.countAllNotification; + this.common.sharedService.setSharedData(this.statsButtons[0].statsValue, 'total-count'); + console.log(this.common.sharedService.getSharedData('total-count', false)); + console.log(this.common.getTotalNumberOfWorklistRequest()); this.common.stopLoading(); //this.ITGCountAllNotification(); this.common.sharedService.setSharedData( @@ -778,7 +783,7 @@ export class HomePage implements OnInit { ); selMenu.GetMenuEntriesList = subMenu; this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA); - if (subMenu.REQUEST_TYPE === 'ABSENCE') { + if (subMenu.REQUEST_TYPE === 'EIT' && subMenu.FUNCTION_NAME === 'XXX_HR_EIT_LOA_CREATE_SS') { this.common.openAbsencePage(); } else if (subMenu.REQUEST_TYPE === 'EIT') { this.common.openEitListPage(); @@ -818,16 +823,17 @@ export class HomePage implements OnInit { let totalTicketsLeft = 0; this.accrualBalancesList = result.GetAccrualBalancesList; for (const accrualBalance of result.GetAccrualBalancesList) { - if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') { - this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); + if (accrualBalance.ACCURAL_PLAN_NAME === 'Annual Vacation Accrual') { + this.statsButtons[1].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'); - } else { - totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; + // this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance'); } + // else { + // totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; + // } } - this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2)); + // this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2)); } }); } @@ -847,8 +853,8 @@ export class HomePage implements OnInit { // this.getDeviceLocation(); this.showAttendanceOptions(); // tslint:disable-next-line: triple-equals - } else if (link == '1' && this.showLoader === false) { - this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count'); + } else if (link == '1') { + // this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count'); this.common.startLoading(); this.common.openNotificationPage(); // tslint:disable-next-line: triple-equals diff --git a/Mohem/src/app/profile/add-address/add-address.component.html b/Mohem/src/app/profile/add-address/add-address.component.html index 695cd8b3..ef083651 100644 --- a/Mohem/src/app/profile/add-address/add-address.component.html +++ b/Mohem/src/app/profile/add-address/add-address.component.html @@ -9,17 +9,17 @@ - + + {{'vacation-rule, effectiveDate' | translate}}