Merge branch 'master-newdesign' of https://hmg.git.cloudforge.com/mohemmionic5 into ashwaq-fix-bug

MOHEMM-Q3-DEV-LATEST
ashwaq 6 years ago
commit 5dfdc112f7

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

@ -25,24 +25,28 @@
<label *ngIf="dataContant.Value && dataContant.Type != 'table'">{{dataContant.Value}}</label>
<div *ngIf="dataContant.MultipleValue && dataContant.Type == 'list'">
<label *ngFor="let data of dataContant.MultipleValue">{{data}}</label>
<label *ngFor="let data of dataContant.MultipleValue">{{data}}<br/></label>
</div>
<div *ngIf="dataContant.Value && dataContant.Type =='table'">
<ion-card class="cardContent">
<ion-card-content>
<div *ngFor="let multiData of dataLabelAndValue">
<div *ngFor="let dataAll of multiData">
<div *ngFor="let dataLabel of dataAll">
<label >{{dataLabel.label}}
<label class="colItemReq">{{dataLabel.label}}
<br/></label>
<div *ngIf="dataLabel.isTable =='false'">
<label >{{dataLabel.textvalue}}
<label *ngIf="dataLabel.textvalue">{{dataLabel.textvalue}}
<br/></label>
<label *ngIf="dataLabel.textvalue==''">none
<br/></label>
<br/>
</div>
<div *ngIf="dataLabel.isTable == 'true'">
<div *ngFor="let subData of dataLabel.textvalue">
<div>
<label >{{subData.label}}
<label style="font-weight: bold;">{{subData.label}}
<br/></label>
<label >{{subData.textvalue}}
<br/></label>
@ -53,6 +57,8 @@
</div>
</div>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-col>
</ion-row>
@ -166,17 +172,17 @@
<ion-tab-bar class="tabBar" slot="bottom" style="overflow-x: scroll;">
<!-- <ion-tab-button *ngFor='let action of actionBTN' [hidden]="action.isAvailable" > -->
<ion-tab-button style="max-width: 20%;" *ngFor='let action of actionBTN; let i=index' [hidden]='!action.isAvailable'
(click)="selectAtion(action.name)">
<ion-tab-button *ngFor='let action of actionBTN; let i=index' [hidden]='!action.isAvailable'
(click)="selectAtion(action.name)" [ngClass]="i === 0 ? 'tabs-margin' : ''">
<img [src]="action.image">
<ion-label style="font-size: 11px;">{{action.name}}</ion-label>
<ion-label style="font-size: 12px;">{{action.name}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="skip()" style="max-width: 20%;">
<ion-tab-button (click)="skip()">
<img src="../assets/imgs/action-skip.png">
<ion-label style="font-size: 11px;">Skip</ion-label>
<ion-label style="font-size: 12px;">Skip</ion-label>
</ion-tab-button>
</ion-tab-bar>

@ -12,5 +12,5 @@
position: fixed !important;
}
.tabs-margin{
margin-left: 90px;
margin-left: 0px;
}

@ -242,8 +242,9 @@ 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');
this.confirmMsg(1)
// this.common.openNotificationPage();
@ -260,8 +261,9 @@ 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)
// this.common.openNotificationPage();
this.skip();
@ -284,8 +286,9 @@ 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)
// this.common.openNotificationPage();
this.skip();
@ -303,8 +306,9 @@ 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)
// this.common.openNotificationPage();
this.skip();
@ -323,8 +327,9 @@ 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)
// this.common.openNotificationPage();
this.skip();
@ -346,8 +351,9 @@ 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)
// this.common.openNotificationPage();
this.skip();

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar style="--background: #22c6b3;">
<!-- <nav-buttons></nav-buttons> -->
<ion-title color="light">{{ 'vacation-rule, search-employee' | translate}}</ion-title>
<ion-buttons slot="primary">

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