Merge branch 'master-newdesign' into enad-issues

mekawy-issues
enadhilal 6 years ago
commit 55107d7a67

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

@ -16,12 +16,16 @@
<ion-title>Attendance Tracking</ion-title>
</ion-toolbar>
</ion-header> -->
<app-generic-header
class="attendance-home"
showBack="true">
</app-generic-header>
<ion-content>
<div class="back-button-container">
<!-- <div class="back-button-container">
<nav-buttons backLink="/home"></nav-buttons>
</div>
</div> -->
<div class="timer-chart">
<ion-label class="shift-title" style="font-weight: bold; font-size: 20px;"> {{curentDate}}</ion-label><br/>
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','today-time-left')}}</ion-label>
@ -59,27 +63,27 @@
</div>
<ion-grid>
<ion-row class="rowBorder">
<ion-col [size]="12" class="colBorder" style="border-right: none;">
<ion-col [size]="12" class="colBorder-generic" style="border-right: none;">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col [size]="6" class="colBorder">
<ion-col [size]="6" class="colBorder-generic">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SWIPE_IN | slice:0:-3}}</ion-label>
</ion-col>
<ion-col [size]="6" class="colBorder" style="border-right: none;">
<ion-col [size]="6" class="colBorder-generic" [ngClass]=" direction === 'en' ? 'colBorder-generic-en' : 'colBorder-generic-ar'">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SWIPE_OUT | slice:0:-3}}</ion-label>
</ion-col>
</ion-row>
<ion-row style="text-align: center">
<ion-col [size]="6" class="colBorder">
<ion-col [size]="6" class="colBorder-generic">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_LATE_IN_HOURS | slice:0:-3}}</ion-label>
</ion-col>
<ion-col [size]="6" class="colBorder" style="border-right: none;">
<ion-col [size]="6" class="colBorder-generic" [ngClass]=" direction === 'en' ? 'colBorder-generic-en' : 'colBorder-generic-ar'">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} </ion-label>
</ion-col>

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

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

@ -37,13 +37,13 @@
</ion-grid>
<div *ngIf="!user">
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/username.png" item-start />
<img style="margin: 9px 8px 9px 0 !important;" class="item-icon" src="assets/imgs/username.png" item-start />
<ion-input class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">
</ion-input>
</ion-item>
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/password.png" item-start />
<img style="margin: 9px 8px 9px 0 !important;" class="item-icon" src="assets/imgs/password.png" item-start />
<ion-input class="login-input" required type="password" [(ngModel)]="password" placeholder="{{ts.trPK('login','password')}}">
</ion-input>
<button ion-button clear class="forgetText" type="button" (click)="forgetPasswordPage()" item-right >

@ -57,7 +57,9 @@
</ion-row>
</ion-grid>
<div class="fixed-shift-timer" *ngIf="isCheckedIn" (click)="openattentracking()">
</ion-content>
<div class="fixed-shift-timer" [ngClass]=" direction === 'en' ? 'fixed-shift-time-en' : 'fixed-shift-time-ar'" *ngIf="isCheckedIn" (click)="openattentracking()">
<span class="subTitle"> {{'home,time-left' | translate}} </span>
<circle-progress
[backgroundColor]= "'#094875'"
@ -81,8 +83,7 @@
[renderOnClick]="false">
</circle-progress>
</div>
<div class="fixed-shift-timer" *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>
</ion-content>

@ -100,10 +100,17 @@ ion-label{
margin: 0 !important;
width: 100% !important;
}
.fixed-shift-time-en {
right: 20px;
}
.fixed-shift-time-ar {
left: 20px;
}
.fixed-shift-timer{
position: fixed;
bottom: 20px;
right: 20px;
z-index: 2;
span.subTitle {
position: absolute;

@ -580,8 +580,10 @@ convertAndAssignTime(data) {
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.percent = 100;
}
}

@ -10,7 +10,7 @@
<div class="request-heading">
<span>{{ts.trPK('work-list','open-analysis')}}</span>
</div>
<div class="result-text-container" [ngStyle]="showChart === false ? {'visibility': 'hidden'} : {}">
<div class="result-text-container" [ngStyle]="showChart === false || receivedITGCount === false ? {'visibility': 'hidden'} : {}">
<span *ngIf="selectedFilter === 'ALL'">{{newWorkListResponse.length + ITGCount}} {{ts.trPK('work-list','of')}} </span>
<span *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse.length}} {{ts.trPK('work-list','of')}} </span>
<h2 *ngIf="!showSearchButton">{{totalRequestCount}}</h2>
@ -18,11 +18,11 @@
<h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse[0].NO_OF_ROWS}}</h2>
<span>{{ts.trPK('work-list','total')}} <br> {{ts.trPK('work-list','open-reqest')}}</span>
</div>
<p-chart *ngIf="!showChart" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
<p-chart *ngIf="showChart" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
<p-chart *ngIf="!showChart || !receivedITGCount" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
<p-chart *ngIf="showChart && receivedITGCount" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<ion-row class="filters-row" *ngIf="showChart">
<ion-row class="filters-row" *ngIf="showChart && receivedITGCount">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of filters; let i=index" [ngClass]="filter.disable === true ? 'disable-filter' : ''">
<app-card-filter

@ -69,6 +69,7 @@ export class HomeComponent implements OnInit {
public selectedFilter = 'ALL';
public showSearchButton = false;
public itemType = '';
public receivedITGCount = false;
public totalHR = 0;
public totalPO = 0;
@ -181,6 +182,8 @@ export class HomeComponent implements OnInit {
console.log(this.filters);
const loadWorkList = this.common.sharedService.getSharedData('loadWorkList', false);
if (loadWorkList) {
this.receivedITGCount = false;
this.showChart = false;
this.common.startLoading();
if (this.infiniteScroll) {
this.infiniteScroll.complete();
@ -199,7 +202,7 @@ export class HomeComponent implements OnInit {
}
callWorkListServices() {
this.Details();
// this.Details();
this.Count();
this.getAllPushNotificationFun();
}
@ -210,6 +213,7 @@ export class HomeComponent implements OnInit {
this.worklistNotifications = result;
this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
this.common.sharedService.setSharedData(result, 'worklistNotifications');
this.Details();
this.callWorkListServices();
}
});
@ -233,8 +237,8 @@ export class HomeComponent implements OnInit {
this.filters[4].value = this.totalMR;
this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER;
}
this.data.datasets[0].data[4] = this.ITGCount;
}
// this.data.datasets[0].data[4] = this.ITGCount;
this.showChart = true;
this.common.stopLoading();
}
@ -559,8 +563,10 @@ export class HomeComponent implements OnInit {
Details() {
this.workListService.getITGDetails('', '', this.isPostNoLoad)
.subscribe((result: any) => {
this.receivedITGCount = true;
this.ITGCount = result.TotalCount;
this.totalRequestCount = this.totalRequestCount + result.TotalCount;
this.data.datasets[0].data[4] = this.ITGCount;
this.filters[5].value = result.TotalCount;
});
}

@ -242,6 +242,7 @@ export class WorkListMainItgComponent implements OnInit {
} else if (result.MessageStatus == 1) {
console.log("hello action 1");
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.presentAlert(this.ts.trPK('worklistMain', 'Tran_Succ'));
this.common.sharedService.setSharedData(true, 'loadWorkList');
@ -260,6 +261,7 @@ export class WorkListMainItgComponent implements OnInit {
this.common.presentAlert(this.ts.trPK('general', 'error-itg'));
} else if (result.MessageStatus == 1) {
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.presentAlert(this.ts.trPK('worklistMain', 'Tran_Succ'));
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.confirmMsg(2)
@ -284,6 +286,7 @@ export class WorkListMainItgComponent implements OnInit {
}
if (result.MessageStatus == 1) {
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.presentAlert(this.ts.trPK('worklistMain', 'Tran_Succ'));
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.confirmMsg(3)
@ -303,6 +306,7 @@ export class WorkListMainItgComponent implements OnInit {
this.common.presentAlert(this.ts.trPK('general', 'error-itg'));
} else if (result.MessageStatus == 1) {
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.presentAlert(this.ts.trPK('worklistMain', 'Tran_Succ'));
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.confirmMsg(4)
@ -323,6 +327,7 @@ export class WorkListMainItgComponent implements OnInit {
this.common.presentAlert(this.ts.trPK('general', 'error-itg'));
} else if (result.MessageStatus == 1) {
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.presentAlert(this.ts.trPK('worklistMain', 'Tran_Succ'));
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.confirmMsg(5)
@ -346,6 +351,7 @@ export class WorkListMainItgComponent implements OnInit {
this.common.presentAlert(this.ts.trPK('general', 'error-itg'));
} else if (result.MessageStatus == 1) {
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.presentAlert(this.ts.trPK('worklistMain', 'Tran_Succ'));
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.confirmMsg(6)

@ -21,9 +21,7 @@ export class TimeInput extends UiElement {
this.value = date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
}
setDate() {
console.log('umar');
}
setDate() {}
public getTemplate() {

@ -1318,6 +1318,9 @@ border:0px
height: 0px !important;
display: none !important;
}
.attendance-home .header-toolbar-new {
--background: #094773 !important;
}
.header-toolbar-new {
--background: #22c6b3;
}

Loading…
Cancel
Save