fixed sfh issues

MOHEMM-PHASE-2-SFH
umasoodch 4 years ago
parent 42ec226d45
commit ed4673a32d

@ -65,7 +65,7 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
</div> </div>
<!--
<ion-item (click)="oepnTransaction()"> <ion-item (click)="oepnTransaction()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left> <img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left>
@ -73,7 +73,7 @@
<ion-label class="profile"> <ion-label class="profile">
{{ts.trPK('general','pending-transaction')}} {{ts.trPK('general','pending-transaction')}}
</ion-label> </ion-label>
</ion-item> </ion-item> -->
<!-- <ion-item (click)="openChangePassword()"> --> <!-- <ion-item (click)="openChangePassword()"> -->
<ion-item (click)="openChangePassword()"> <ion-item (click)="openChangePassword()">
@ -182,14 +182,15 @@
</ion-item> </ion-item>
</div> </div>
<ion-item (click)="oepnTransaction()"> <!-- <ion-item (click)="oepnTransaction()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left> <img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label class="profile"> <ion-label class="profile">
{{ts.trPK('general','pending-transaction')}} {{ts.trPK('general','pending-transaction')}}
</ion-label> </ion-label>
</ion-item> </ion-item> -->
<ion-item (click)="openChangePassword()"> <ion-item (click)="openChangePassword()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/lock_icon.png" item-left> <img style= "height: 25px !important;" src="../assets/imgs/lock_icon.png" item-left>

@ -1626,15 +1626,6 @@ export class CommonService {
disable: false, disable: false,
total: 0 total: 0
}, },
{
value: 0,
name: 'MR',
active: false,
color: '#3cb9d5',
key: 'INVMOA',
disable: false,
total: 0
},
{ {
value: 0, value: 0,
name: 'PR', name: 'PR',
@ -1652,49 +1643,17 @@ export class CommonService {
key: 'POAPPRV', key: 'POAPPRV',
disable: false, disable: false,
total: 0 total: 0
}, }
{
value: 0,
name: 'ITG',
active: false,
color: '#cc3232',
key: 'ITG',
disable: false,
total: 0
},
{
value: 0,
name: 'IC',
active: false,
color: '#9e7e97',
key: 'INVITEM',
disable: false,
total: 0
},
{
value: 0,
name: 'STAMP',
active: false,
color: '#ff9800',
key: 'STAMP',
disable: false,
total: 0,
},
]; ];
public data = { public data = {
datasets: [ datasets: [
{ {
data: [0, 0, 0, 0, 0, 0, 0], data: [0, 0, 0, 0, 0],
backgroundColor: [ backgroundColor: [
'#18a169', '#18a169',
'#3cb9d5',
'#114475', '#114475',
'#38c9b3', '#38c9b3'
'#cc3232',
'#9e7e97',
'#ff9800'
], ],
borderWidth: 6 borderWidth: 6
}] }]
@ -1705,21 +1664,12 @@ export class CommonService {
// if (notification.ITEM_TYPE === 'HRSSA') { // if (notification.ITEM_TYPE === 'HRSSA') {
this.filters[0].value = this.filterKeys['HRSSA']; this.filters[0].value = this.filterKeys['HRSSA'];
this.data.datasets[0].data[0] = this.filterKeys['HRSSA']; this.data.datasets[0].data[0] = this.filterKeys['HRSSA'];
// } else if (notification.ITEM_TYPE === 'INVMOA') {
this.filters[1].value = this.filterKeys['INVMOA'];
this.data.datasets[0].data[1] = this.filterKeys['INVMOA'];
// } else if (notification.ITEM_TYPE === 'REQAPPRV') { // } else if (notification.ITEM_TYPE === 'REQAPPRV') {
this.filters[2].value = this.filterKeys['REQAPPRV']; this.filters[1].value = this.filterKeys['REQAPPRV'];
this.data.datasets[0].data[2] = this.filterKeys['REQAPPRV']; this.data.datasets[0].data[1] = this.filterKeys['REQAPPRV'];
// } else if (notification.ITEM_TYPE === 'POAPPRV') { // } else if (notification.ITEM_TYPE === 'POAPPRV') {
this.filters[3].value = this.filterKeys['POAPPRV']; this.filters[2].value = this.filterKeys['POAPPRV'];
this.data.datasets[0].data[3] = this.filterKeys['POAPPRV']; this.data.datasets[0].data[2] = this.filterKeys['POAPPRV'];
// } else if (notification.ITEM_TYPE === 'INVITEM') {
this.filters[5].value = this.filterKeys['INVITEM'];
this.data.datasets[0].data[5] = this.filterKeys['INVITEM'];
// } else if (notification.ITEM_TYPE === 'STAMP') {
this.filters[6].value = this.filterKeys['STAMP'];
this.data.datasets[0].data[6] = this.filterKeys['STAMP'];
let val = { 'filters': [], 'data': {} }; let val = { 'filters': [], 'data': {} };

@ -69,6 +69,11 @@ export class HomePage implements OnInit {
public isFakeLocationUsed = false; public isFakeLocationUsed = false;
public intervalCountdown: any; public intervalCountdown: any;
public statsButtons = [ public statsButtons = [
{
title: this.ts.trPK('attendance-tracking', 'title'),
link: '0',
show: true
},
{ {
title: this.ts.trPK('home', 'worklist'), title: this.ts.trPK('home', 'worklist'),
statsValue: 0, statsValue: 0,
@ -292,7 +297,7 @@ export class HomePage implements OnInit {
for (const servicePrivilage of AuthenticationService.servicePrivilage) { for (const servicePrivilage of AuthenticationService.servicePrivilage) {
if (servicePrivilage.Previlege === false) { if (servicePrivilage.Previlege === false) {
if (servicePrivilage.ServiceName === 'accrualBalance') { if (servicePrivilage.ServiceName === 'accrualBalance') {
this.statsButtons[1].show = false; this.statsButtons[2].show = false;
// this.statsButtons[2].show = false; // this.statsButtons[2].show = false;
} }
if (servicePrivilage.ServiceName === 'vacationRule') { if (servicePrivilage.ServiceName === 'vacationRule') {
@ -304,7 +309,7 @@ export class HomePage implements OnInit {
// document.getElementById(servicePrivilage.ServiceName).style.filter = // document.getElementById(servicePrivilage.ServiceName).style.filter =
// 'grayscale(1)'; // 'grayscale(1)';
} else { } else {
this.statsButtons[1].show = true; this.statsButtons[2].show = true;
// this.statsButtons[2].show = true; // this.statsButtons[2].show = true;
this.showVcationRule = true; this.showVcationRule = true;
} }
@ -363,8 +368,8 @@ export class HomePage implements OnInit {
this.openNotificationsDashbored(); this.openNotificationsDashbored();
} }
this.showOpenMissingSwipes(); // this.showOpenMissingSwipes();
this.showAttendanceTracking(); // this.showAttendanceTracking();
var accrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false); var accrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
if (!accrualBalance) if (!accrualBalance)
this.getAccrualBalance(); this.getAccrualBalance();
@ -464,7 +469,7 @@ export class HomePage implements OnInit {
); );
this.eitService this.eitService
.getMenuEntries(request, '', '', this.isPostNoLoad) .getMenuEntries(request, '', '', false)
.subscribe((result: MenuResponse) => { .subscribe((result: MenuResponse) => {
this.handleMenuEntiresResult(result); this.handleMenuEntiresResult(result);
}); });
@ -649,7 +654,7 @@ export class HomePage implements OnInit {
const key = 'P_OPEN_NTF_NUMBER'; const key = 'P_OPEN_NTF_NUMBER';
this.countAllNotification = result[key]; this.countAllNotification = result[key];
// this.ITGCountAllNotification(); // this.ITGCountAllNotification();
this.statsButtons[0].statsValue = Math.floor(this.countAllNotification); this.statsButtons[1].statsValue = Math.floor(this.countAllNotification);
this.common.sharedService.setSharedData( this.common.sharedService.setSharedData(
result, result,
'worklistNotifications' 'worklistNotifications'
@ -741,7 +746,7 @@ export class HomePage implements OnInit {
this.accrualBalancesList = result.GetAccrualBalancesList; this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of result.GetAccrualBalancesList) { for (const accrualBalance of result.GetAccrualBalancesList) {
if (accrualBalance.ACCURAL_PLAN_NAME === 'SFHP Annual Leave Plan') { if (accrualBalance.ACCURAL_PLAN_NAME === 'SFHP Annual Leave Plan') {
this.statsButtons[1].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); this.statsButtons[2].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance'); this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance');
this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate'); this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate');
this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance'); this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance');

@ -1,7 +1,7 @@
<app-generic-header <app-generic-header
showBack="true" showBack="true"
backLink="/home" backLink="/home"
[worklistSetting] ='true' [worklistSetting] ='false'
[headerText]="'home, worklist' | translate"> [headerText]="'home, worklist' | translate">
</app-generic-header> </app-generic-header>
@ -11,21 +11,6 @@
<div class="request-heading"> <div class="request-heading">
<span>{{ts.trPK('work-list','open-analysis')}}</span> <span>{{ts.trPK('work-list','open-analysis')}}</span>
</div> </div>
<<<<<<< HEAD
<div class="result-text-container" [ngStyle]="showChart === 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>
<h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && itemType === ''">{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}</h2>
<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="checkLoadingStatus()" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<ion-row class="filters-row" *ngIf="showChart">
=======
<div class="result-text-container" > <div class="result-text-container" >
<h2>{{totalRequestCount}}</h2> <h2>{{totalRequestCount}}</h2>
<!-- <h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && itemType === ''">{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}</h2> --> <!-- <h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && itemType === ''">{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}</h2> -->
@ -40,7 +25,6 @@
</div> </div>
<ion-row class="filters-row"> <ion-row class="filters-row">
>>>>>>> MOHEMM-Q3-DEV-LATEST
<ion-slides [options]="slideOptsOne"> <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of filters; let i=index" [ngClass]="filter.disable === true ? 'disable-filter' : ''"> <ion-slide *ngFor="let filter of filters; let i=index" [ngClass]="filter.disable === true ? 'disable-filter' : ''">
<app-card-filter <app-card-filter

@ -195,9 +195,6 @@ export class HomeComponent implements OnInit {
} }
callWorkListServices() { callWorkListServices() {
// if (this.countChanged) {
this.Count();
// }
this.getAllPushNotificationFun(); this.getAllPushNotificationFun();
} }
@ -212,7 +209,7 @@ export class HomeComponent implements OnInit {
//this.resetFiltersUI(); //this.resetFiltersUI();
// this.assignDataToFilters(); // this.assignDataToFilters();
// this.common.sharedService.setSharedData(result, 'worklistNotifications'); // this.common.sharedService.setSharedData(result, 'worklistNotifications');
this.Details(); // this.Details();
this.callWorkListServices(); this.callWorkListServices();
// } // }
// }); // });
@ -623,8 +620,8 @@ export class HomeComponent implements OnInit {
//.subscribe((result: any) => { //.subscribe((result: any) => {
this.ITGCount = this.common.filterKeys['ITG'];//result.TotalCount; this.ITGCount = this.common.filterKeys['ITG'];//result.TotalCount;
// this.totalRequestCount = this.totalRequestCount + result.TotalCount; // this.totalRequestCount = this.totalRequestCount + result.TotalCount;
this.data.datasets[0].data[4] = this.common.filterKeys['ITG'];//this.ITGCount; this.data.datasets[0].data[3] = this.common.filterKeys['ITG'];//this.ITGCount;
this.filters[4].value = this.common.filterKeys['ITG']; this.filters[3].value = this.common.filterKeys['ITG'];
this.receivedITGCount = true; this.receivedITGCount = true;
//}); //});
//} //}

Loading…
Cancel
Save