Merge branch 'MOHEMM-Q2-DEV' into enad-Q1

enad-Q1
umasoodch 5 years ago
commit 26f47c2608

@ -29,7 +29,7 @@
.titleBox { .titleBox {
display: block; display: block;
span { span {
font-size: 30px; font-size: 25px;
font-weight: bold; font-weight: bold;
color: black; color: black;
text-align: left; text-align: left;

@ -737,7 +737,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 === 'HMG Annual Vacation Accrual Plan') { if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') {
this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT; this.statsButtons[3].statsValue = parseInt(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');
@ -745,7 +745,7 @@ export class HomePage implements OnInit {
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
} }
} }
this.statsButtons[4].statsValue = totalTicketsLeft; this.statsButtons[4].statsValue = parseInt(totalTicketsLeft.toFixed(2));
} }
}); });
} }

@ -32,9 +32,10 @@
<div class="container-icon" *ngIf="categories.length>0"> <div class="container-icon" *ngIf="categories.length>0">
<div class="box-icon" *ngFor="let key of categories"> <div class="box-icon" *ngFor="let key of categories">
<div class="sale-icon" (click)="filterOffers(key)" [ngClass]="{'active':activeClass==key.categoryName_en }"> <div class="sale-icon" (click)="filterOffers(key)" [ngClass]="{'active':activeClass==key.categoryName_en }">
<div class="top"> <div class="top" [innerHTML]="key.content">
<!-- <ion-icon name="images"></ion-icon> --> <!-- <ion-icon name="images"></ion-icon> -->
<img [src]="key.content" /> <!-- <span [innerHTML]="key.content"></span> -->
<!-- <img [src]="key.content" /> -->
</div> </div>
<div class="bottom-icon"> <div class="bottom-icon">
<p *ngIf="direction =='ltr'">{{key.categoryName_en}}</p> <p *ngIf="direction =='ltr'">{{key.categoryName_en}}</p>

@ -5,7 +5,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { OfferDiscountService } from '../services/service'; import { OfferDiscountService } from '../services/service';
import { IonInfiniteScroll } from '@ionic/angular'; import { IonInfiniteScroll } from '@ionic/angular';
import { DomSanitizer} from '@angular/platform-browser';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
templateUrl: './home.component.html', templateUrl: './home.component.html',
@ -32,7 +32,8 @@ export class HomeComponent implements AfterViewInit {
public modalController: ModalController, public modalController: ModalController,
public cs: CommonService, public cs: CommonService,
public offersService: OfferDiscountService, public offersService: OfferDiscountService,
public route: ActivatedRoute) { public route: ActivatedRoute,
private sanitizer: DomSanitizer) {
this.route this.route
.params.subscribe(val => { .params.subscribe(val => {
@ -60,6 +61,9 @@ export class HomeComponent implements AfterViewInit {
getCategories() { getCategories() {
this.offersService.getCategories({}).subscribe((result) => { this.offersService.getCategories({}).subscribe((result) => {
this.categories = JSON.parse(result.Mohemm_ITG_ResponseItem).result.data; //result.result.data; this.categories = JSON.parse(result.Mohemm_ITG_ResponseItem).result.data; //result.result.data;
for (let i = 0; i < this.categories.length; i++) {
this.categories[i].content = this.sanitizer.bypassSecurityTrustHtml(this.categories[i].content);
}
this.cs.sharedService.setSharedData(this.categories, OfferDiscountService.categories); this.cs.sharedService.setSharedData(this.categories, OfferDiscountService.categories);
}); });
} }

Loading…
Cancel
Save