From 08ad2e966794c2bb7f5e7d313c5b929e1efba47a Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 26 Aug 2021 16:05:48 +0300 Subject: [PATCH] fixed feedback issues --- Mohem/src/app/app.component.ts | 6 +++++- .../attendance-options.component.ts | 11 +++++++++++ Mohem/src/app/home/home.page.ts | 5 ++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 40b54e26..87ca3bb4 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -200,7 +200,11 @@ export class AppComponent implements OnInit { } else { this.user_image = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'; } - this.User_Job_name = user.JOB_NAME; + // this.User_Job_name = user.JOB_NAME; + let jobTitle = user.POSITION_NAME.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.User_Job_name = jobTitle[0] + " " + jobTitle[1]; + }​ //erm channel // if (!CommonService.SKIP) // this.cs.navigateForward('/erm-channel/survey'); diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.ts b/Mohem/src/app/home/attendance-options/attendance-options.component.ts index 5bac44aa..8de622b0 100644 --- a/Mohem/src/app/home/attendance-options/attendance-options.component.ts +++ b/Mohem/src/app/home/attendance-options/attendance-options.component.ts @@ -240,6 +240,17 @@ export class AttendanceOptionsComponent implements OnInit { const isAndroid = this.platform.is("android"); const isIOS = this.platform.is("ios"); const isWifiEnabled = await this.wifiWizard2.isWifiEnabled(); + const versionType = this.device.version; + const versionTypeInt = parseInt(versionType); + console.log('version type: ' + versionType); + console.log('version Type: ' + versionTypeInt); + + if(isAndroid && versionTypeInt > 10) { + if(!isWifiEnabled){ + this.showWifiNotEnabled(); + return; + } + } if (isIOS) { if(!isWifiEnabled){ diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index f4c5877c..c526e729 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -737,8 +737,7 @@ export class HomePage implements OnInit { this.accrualBalancesList = result.GetAccrualBalancesList; for (const accrualBalance of result.GetAccrualBalancesList) { if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') { - this.statsButtons[3].statsValue = - Math.floor(accrualBalance.ACCRUAL_NET_ENTITLEMENT); + this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT; this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance'); this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate'); this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance'); @@ -746,7 +745,7 @@ export class HomePage implements OnInit { totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; } } - this.statsButtons[4].statsValue = Math.floor(totalTicketsLeft); + this.statsButtons[4].statsValue = totalTicketsLeft; } }); }