diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index bfa57d03..caa016df 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -40,6 +40,7 @@ export class AppComponent implements OnInit, AfterViewInit { user: boolean; deviceToken: string; TeamFlag: string = 'false'; + isIOS = false; constructor( public ts: TranslatorService, private cs: CommonService, @@ -72,9 +73,13 @@ export class AppComponent implements OnInit, AfterViewInit { this.lazyLoadingService.monitorLazyLoading(15, true); this.platform.ready().then(() => { this.ts.loadResources(() => { + this.isIOS = this.platform.is('ios') ? true : false; this.initializeDirection(); // this.statusBar.styleDefault(); this.start = true; + if (this.isIOS) { + this.monitUrlChange(); + } this.watchLanguageChangeEvents(); this.subscribeEvents(); this.keyboardService.watchKeyboard(); @@ -83,6 +88,17 @@ export class AppComponent implements OnInit, AfterViewInit { }); } + private monitUrlChange() { + this.router.events.subscribe((val) => { + if (this.router.isActive('/authentication/login', true)) { + this.direction = 'ltr'; + } else { + this.direction = TranslatorService.getCurrentDirection(); + } + }); + + } + private startReceivingPushService() { console.log('platform.ready'); this.pushService.startReceiving(); @@ -137,7 +153,16 @@ export class AppComponent implements OnInit, AfterViewInit { console.log("this.TeamFlag>>>>>>>>>"+ this.TeamFlag); } private initializeDirection() { - this.direction = TranslatorService.getCurrentDirection(); + if (this.isIOS) { + if (this.router.isActive('/authentication/login', true)) { + this.direction = 'ltr'; + } else { + this.direction = TranslatorService.getCurrentDirection(); + } + } else { + this.direction = TranslatorService.getCurrentDirection(); + } + } private watchUserLoginChangeEvents() { this.events.subscribe( diff --git a/Mohem/src/app/attendance-tracking/home/home.component.html b/Mohem/src/app/attendance-tracking/home/home.component.html index 1a4ae913..e9b87275 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.html +++ b/Mohem/src/app/attendance-tracking/home/home.component.html @@ -16,12 +16,16 @@ Attendance Tracking --> + + -
+
{{curentDate}}
{{ts.trPK('attendance-tracking','today-time-left')}} @@ -59,27 +63,27 @@
- + {{ts.trPK('attendance-tracking','shift-time')}} {{attendanceTrackingList.P_SHT_NAME}} - + {{ts.trPK('attendance-tracking','check-in')}} {{attendanceTrackingList.P_SWIPE_IN | slice:0:-3}} - + {{ts.trPK('attendance-tracking','check-out')}} {{attendanceTrackingList.P_SWIPE_OUT | slice:0:-3}} - + {{ts.trPK('attendance-tracking','late-in')}} {{attendanceTrackingList.P_LATE_IN_HOURS | slice:0:-3}} - + {{ts.trPK('attendance-tracking','regular')}} {{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} diff --git a/Mohem/src/app/attendance-tracking/home/home.component.scss b/Mohem/src/app/attendance-tracking/home/home.component.scss index f92e8d05..1211aa37 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.scss +++ b/Mohem/src/app/attendance-tracking/home/home.component.scss @@ -49,12 +49,15 @@ ion-grid { margin-top: -40px; border: solid 5px #053c63; } -.colBorder{ +.colBorder-generic{ padding: 20px 0px; text-align: center; } -.colBorder:nth-child(1){ +.colBorder-generic-en{ + border-left: var(--lightblue) solid 1px; +} +.colBorder-generic-ar{ border-right: var(--lightblue) solid 1px; } diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts index aa8ca30b..cf572606 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.ts +++ b/Mohem/src/app/attendance-tracking/home/home.component.ts @@ -99,8 +99,11 @@ export class HomeComponent implements OnInit { this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':')); this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':')); this.isCheckedIn = this.spentHours === 0 ? false : true; - if (this.isCheckedIn) { + if (this.isCheckedIn && this.remainingTime != 0) { this.initTimer(); + } else if (this.isCheckedIn && this.remainingTime === 0) { + this.displayTime = '00:00:00'; + this.percent = 100; } } diff --git a/Mohem/src/app/authentication/login/login.component.html b/Mohem/src/app/authentication/login/login.component.html index 2d7c2a05..0221f3ab 100644 --- a/Mohem/src/app/authentication/login/login.component.html +++ b/Mohem/src/app/authentication/login/login.component.html @@ -37,13 +37,13 @@