Merge branch 'MOE_DEV' of https://gitlab.com/haroon6138/mohemmionic5 into MOE_DEV

MOE_DEV
Sultan Khan 3 years ago
commit 720abf8efc

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

@ -89,7 +89,7 @@
</ion-label>
</ion-item> -->
<ion-item (click)="openDigitalId()">
<!-- <ion-item (click)="openDigitalId()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/ID_ico_menu.png" item-left>
</ion-thumbnail>
@ -97,9 +97,9 @@
{{ts.trPK('general','digital-id')}}
<ion-badge class="start-badge main-badge" slot="end" color="danger">{{notBadge}}</ion-badge>
</ion-label>
</ion-item>
</ion-item> -->
<ion-item *ngIf='userInfo?.show_business' (click)="openBusinessCard()">
<!-- <ion-item *ngIf='userInfo?.show_business' (click)="openBusinessCard()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/business-card-design.png" item-left>
</ion-thumbnail>
@ -107,7 +107,7 @@
{{ts.trPK('general','business-card')}}
<ion-badge class="start-badge main-badge" slot="end" color="danger">{{notBadge}}</ion-badge>
</ion-label>
</ion-item>
</ion-item> -->
</ion-list>
@ -216,7 +216,7 @@
</button> -->
<!-- </ion-item> -->
<ion-item (click)="openDigitalId()">
<!-- <ion-item (click)="openDigitalId()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/ID_ico_menu.png" item-left>
</ion-thumbnail>
@ -224,9 +224,9 @@
{{ts.trPK('general','digital-id')}}
<ion-badge class="start-badge main-badge" slot="end" color="danger">{{notBadge}}</ion-badge>
</ion-label>
</ion-item>
</ion-item> -->
<ion-item *ngIf='userInfo?.show_business' (click)="openBusinessCard()">
<!-- <ion-item *ngIf='userInfo?.show_business' (click)="openBusinessCard()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/business-card-design.png" item-left>
</ion-thumbnail>
@ -234,7 +234,7 @@
{{ts.trPK('general','business-card')}}
<ion-badge class="start-badge main-badge" slot="end" color="danger">{{notBadge}}</ion-badge>
</ion-label>
</ion-item>
</ion-item> -->
<!-- <ion-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb">

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

@ -49,22 +49,22 @@
</app-button>
</ion-col>
</ion-row>
<ion-row>
<!-- <ion-row>
<ion-col>
<ion-button *ngIf="userInfo" class="button-digital-id" (click)="loginWithDigitalID()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p>
<img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button>
</ion-col>
</ion-row>
<ion-row>
</ion-row> -->
<!-- <ion-row>
<ion-col style="padding-bottom: 100px !important;">
<ion-button *ngIf="showBusinessCard" class="button-digital-id" (click)="loginWithBusinessCard()" >
<p style="color: black;">{{ts.trPK('general','business-card')}}</p>
<img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button>
</ion-col>
</ion-row>
</ion-row> -->
</ion-grid>
</ion-content>

@ -10,9 +10,9 @@
<ion-row *ngIf="showStaticServices" class="slideFullWidth">
<ion-slides [options]="slideOptsOne" class="padding-slide slide">
<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" />
</div>
</div> -->
<app-stats-button
[title]="button.title"
[statsValue]="button.statsValue"

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

@ -9,17 +9,17 @@
<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-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>
</ion-item>
<ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==true">
</ion-item> -->
<!-- <ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==true">
<ion-label>{{selectedCountryName}}</ion-label>
</ion-item>
</ion-item> -->
<ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==false">
<ion-label>{{'vacation-rule, effectiveDate' | translate}}</ion-label>
<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;
country: any = 'SA';
selectedCountryName: any;
public effectiveDate: any;
public effectiveDate: any = new Date();
public submitAbsObjList: any = [];
public selectedStatus: any = {};
public isUpdate: boolean;
@ -96,7 +96,9 @@ export class AddAddressComponent implements OnInit {
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
}
ngOnInit() { }
ngOnInit() {
// this.effectiveDate = new Date();
}
ngAfterViewInit() {
this.selectedStatus = this.cs.sharedService.getSharedData(ProfileService.SELECTED_STATUS);
@ -111,7 +113,6 @@ export class AddAddressComponent implements OnInit {
}
this.getEitDffStructure();
this.getCountires();
this.effectiveDate = new Date();
}
private getEitDffStructure() {

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

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

Loading…
Cancel
Save