fixed moe issues

MOE_DEV
umasoodch 4 years ago
parent 32270138e5
commit 6ba9a7b08b

@ -263,8 +263,8 @@ export class HomeComponent implements OnInit {
this.balance = result.GetAccrualBalancesList; this.balance = result.GetAccrualBalancesList;
} }
if (this.balance) { if (this.balance) {
this.accrualNet = this.balance[0].ACCRUAL_NET_ENTITLEMENT; this.accrualNet = this.balance[1].ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.balance[0].ACCRUAL_USED_ENTITLEMENT; this.accrualUsed = this.balance[1].ACCRUAL_USED_ENTITLEMENT;
// this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT; // this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT;
// this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly; // this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber = this.accrualNet + this.accrualUsed; this.totalnumber = this.accrualNet + this.accrualUsed;

@ -1588,6 +1588,7 @@ export class CommonService {
public totalCounter = 0; public totalCounter = 0;
getTotalNumberOfWorklistRequest() { getTotalNumberOfWorklistRequest() {
console.log(this.sharedService.getSharedData('total-count', false));
this.totalCounter = parseInt(this.sharedService.getSharedData('total-count', false)); this.totalCounter = parseInt(this.sharedService.getSharedData('total-count', false));
return this.totalCounter ? this.totalCounter : 0; return this.totalCounter ? this.totalCounter : 0;
} }
@ -1600,7 +1601,6 @@ export class CommonService {
public setFilterValues(data) { public setFilterValues(data) {
for (const notification of data) { for (const notification of data) {
this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER
} }
} }

@ -27,7 +27,7 @@ export class ConnectorService {
public static retryTimes = 0; public static retryTimes = 0;
public static timeOut = 180 * 1000; public static timeOut = 180 * 1000;
//public static host = 'https://uat.hmgwebservices.com/'; // public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/'; // public static host = 'https://hmgwebservices.com/';
public static host = 'http://riyt-mohemm1:1010/' //MOE public static host = 'http://riyt-mohemm1:1010/' //MOE
constructor(public httpClient: HttpClient, constructor(public httpClient: HttpClient,

@ -10,9 +10,9 @@
<ion-row *ngIf="showStaticServices" class="slideFullWidth"> <ion-row *ngIf="showStaticServices" class="slideFullWidth">
<ion-slides [options]="slideOptsOne" class="padding-slide slide"> <ion-slides [options]="slideOptsOne" class="padding-slide slide">
<ion-slide *ngFor="let button of statsButtons; let i=index;"> <ion-slide *ngFor="let button of statsButtons; let i=index;">
<div class="loader" *ngIf="i === 1 && showLoader"> <!-- <div class="loader" *ngIf="i === 1 && showLoader">
<img src="../assets/icon/progress-loading.gif" /> <img src="../assets/icon/progress-loading.gif" />
</div> </div> -->
<app-stats-button <app-stats-button
[title]="button.title" [title]="button.title"
[statsValue]="button.statsValue" [statsValue]="button.statsValue"

@ -97,15 +97,15 @@ export class HomePage implements OnInit {
statsValue: 0, statsValue: 0,
icon: 'assets/icon/new-design/leave_balance.png', icon: 'assets/icon/new-design/leave_balance.png',
link: '3', link: '3',
show: this.isShow, show: true,
},
{
title: this.ts.trPK('absenceList', 'tickets-balance'),
statsValue: 0,
icon: 'assets/icon/new-design/ticket_balance.png',
link: '4',
show: this.isShow
} }
// {
// title: this.ts.trPK('absenceList', 'tickets-balance'),
// statsValue: 0,
// icon: 'assets/icon/new-design/ticket_balance.png',
// link: '4',
// show: this.isShow
// }
]; ];
public slideOptsOne = {}; public slideOptsOne = {};
@ -383,9 +383,10 @@ export class HomePage implements OnInit {
//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();
}
} }
public Vacation_Rule() { public Vacation_Rule() {
@ -488,6 +489,7 @@ export class HomePage implements OnInit {
this.eitService this.eitService
.getMenuEntries(request, '', '', this.isPostNoLoad) .getMenuEntries(request, '', '', this.isPostNoLoad)
.subscribe((result: MenuResponse) => { .subscribe((result: MenuResponse) => {
this.common.stopLoading();
this.handleMenuEntiresResult(result); this.handleMenuEntiresResult(result);
}); });
} }
@ -510,7 +512,7 @@ export class HomePage implements OnInit {
if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_TKT_NEW_EIT_SS') { if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_TKT_NEW_EIT_SS') {
this.ticketRequestObject = result.GetMenuEntriesList[i]; this.ticketRequestObject = result.GetMenuEntriesList[i];
// tslint:disable-next-line: triple-equals // tslint:disable-next-line: triple-equals
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HR_LOA_SS') { } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'XXX_HR_EIT_LOA_CREATE_SS') {
this.leaveRequestObject = result.GetMenuEntriesList[i]; this.leaveRequestObject = result.GetMenuEntriesList[i];
// tslint:disable-next-line: triple-equals // tslint:disable-next-line: triple-equals
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') { } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') {
@ -671,6 +673,9 @@ 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.statsButtons[0].statsValue = this.countAllNotification; this.statsButtons[0].statsValue = this.countAllNotification;
this.common.sharedService.setSharedData(this.statsButtons[0].statsValue, 'total-count');
console.log(this.common.sharedService.getSharedData('total-count', false));
console.log(this.common.getTotalNumberOfWorklistRequest());
this.common.stopLoading(); this.common.stopLoading();
//this.ITGCountAllNotification(); //this.ITGCountAllNotification();
this.common.sharedService.setSharedData( this.common.sharedService.setSharedData(
@ -778,7 +783,7 @@ export class HomePage implements OnInit {
); );
selMenu.GetMenuEntriesList = subMenu; selMenu.GetMenuEntriesList = subMenu;
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA); this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
if (subMenu.REQUEST_TYPE === 'ABSENCE') { if (subMenu.REQUEST_TYPE === 'EIT' && subMenu.FUNCTION_NAME === 'XXX_HR_EIT_LOA_CREATE_SS') {
this.common.openAbsencePage(); this.common.openAbsencePage();
} else if (subMenu.REQUEST_TYPE === 'EIT') { } else if (subMenu.REQUEST_TYPE === 'EIT') {
this.common.openEitListPage(); this.common.openEitListPage();
@ -818,16 +823,17 @@ export class HomePage implements OnInit {
let totalTicketsLeft = 0; let totalTicketsLeft = 0;
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 === 'HMG Annual Vacation Accrual Plan') { if (accrualBalance.ACCURAL_PLAN_NAME === 'Annual Vacation Accrual') {
this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); this.statsButtons[1].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');
} else {
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
} }
// else {
// totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
// }
} }
this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2)); // this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2));
} }
}); });
} }
@ -847,8 +853,8 @@ export class HomePage implements OnInit {
// this.getDeviceLocation(); // this.getDeviceLocation();
this.showAttendanceOptions(); this.showAttendanceOptions();
// tslint:disable-next-line: triple-equals // tslint:disable-next-line: triple-equals
} else if (link == '1' && this.showLoader === false) { } else if (link == '1') {
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count'); // this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.common.startLoading(); this.common.startLoading();
this.common.openNotificationPage(); this.common.openNotificationPage();
// tslint:disable-next-line: triple-equals // tslint:disable-next-line: triple-equals

@ -9,17 +9,17 @@
<ion-content padding> <ion-content padding>
<ion-item class="country dynamicField" lines="none" *ngIf="!isUpdate"> <!-- <ion-item class="country dynamicField" lines="none" *ngIf="!isUpdate">
<ion-label> {{ts.trPK('general','country')}}</ion-label> <ion-label> {{ts.trPK('general','country')}}</ion-label>
<ion-select value="brown" okText="Okay" cancelText="Dismiss" [(ngModel)]="country"> <ion-select value="brown" okText="Okay" cancelText="Dismiss" [(ngModel)]="country">
<ion-select-option [value]="country.COUNTRY_CODE" *ngFor="let country of countries">{{country.COUNTRY_NAME}}</ion-select-option> <ion-select-option [value]="country.COUNTRY_CODE" *ngFor="let country of countries">{{country.COUNTRY_NAME}}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item> -->
<ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==true"> <!-- <ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==true">
<ion-label>{{selectedCountryName}}</ion-label> <ion-label>{{selectedCountryName}}</ion-label>
</ion-item> </ion-item> -->
<ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==false"> <ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==false">
<ion-label>{{'vacation-rule, effectiveDate' | translate}}</ion-label> <ion-label>{{'vacation-rule, effectiveDate' | translate}}</ion-label>
<ion-datetime [(ngModel)]="effectiveDate" min="1900" max="2100" displayFormat="DD/MM/YYYY " placeholder="MM/DD/YYYY" <ion-datetime [(ngModel)]="effectiveDate" min="1900" max="2100" displayFormat="DD/MM/YYYY " placeholder="MM/DD/YYYY"

@ -66,7 +66,7 @@ export class AddAddressComponent implements OnInit {
direction: string; direction: string;
country: any = 'SA'; country: any = 'SA';
selectedCountryName: any; selectedCountryName: any;
public effectiveDate: any; public effectiveDate: any = new Date();
public submitAbsObjList: any = []; public submitAbsObjList: any = [];
public selectedStatus: any = {}; public selectedStatus: any = {};
public isUpdate: boolean; public isUpdate: boolean;
@ -96,7 +96,9 @@ export class AddAddressComponent implements OnInit {
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT; this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
} }
ngOnInit() { } ngOnInit() {
// this.effectiveDate = new Date();
}
ngAfterViewInit() { ngAfterViewInit() {
this.selectedStatus = this.cs.sharedService.getSharedData(ProfileService.SELECTED_STATUS); this.selectedStatus = this.cs.sharedService.getSharedData(ProfileService.SELECTED_STATUS);
@ -111,7 +113,6 @@ export class AddAddressComponent implements OnInit {
} }
this.getEitDffStructure(); this.getEitDffStructure();
this.getCountires(); this.getCountires();
this.effectiveDate = new Date();
} }
private getEitDffStructure() { private getEitDffStructure() {

@ -1234,7 +1234,7 @@ export class AddBasicDetailsComponent implements OnInit {
} }
public customiseDate(date: any) { public customiseDate(date: any) {
let formatedDate = date.slice(0, 9); let formatedDate = date.slice(0, 10);
let newDate = formatedDate.split("/").reverse(); let newDate = formatedDate.split("/").reverse();
const tmp = newDate[2]; const tmp = newDate[2];
newDate[2] = newDate[1]; newDate[2] = newDate[1];

@ -370,6 +370,7 @@ export class HomeComponent implements OnInit {
if (this.addressSubMenu && this.addressSubMenu.UPDATE_BUTTON === 'Y') { if (this.addressSubMenu && this.addressSubMenu.UPDATE_BUTTON === 'Y') {
this.presentModal('address'); this.presentModal('address');
} else { } else {
this.cs.sharedService.getSharedData(ProfileService.SELECTED_STATUS);
this.cs.openAddAddress(); this.cs.openAddAddress();
} }
} }

Loading…
Cancel
Save