From 5e389beb9849851e5ddb779852947ec3efd4e7d9 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Mon, 30 Aug 2021 14:53:06 +0300 Subject: [PATCH 1/2] fixed feedback issues --- .../hmg-common/ui/stats-button/stats-button.component.scss | 2 +- Mohem/src/app/home/home.page.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss index 995c5284..0663997a 100644 --- a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss +++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss @@ -29,7 +29,7 @@ .titleBox { display: block; span { - font-size: 30px; + font-size: 25px; font-weight: bold; color: black; text-align: left; diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index c526e729..14ad0659 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -737,7 +737,7 @@ export class HomePage implements OnInit { 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; + this.statsButtons[3].statsValue = parseInt(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'); @@ -745,7 +745,7 @@ export class HomePage implements OnInit { totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; } } - this.statsButtons[4].statsValue = totalTicketsLeft; + this.statsButtons[4].statsValue = parseInt(totalTicketsLeft.toFixed(2)); } }); } From 267ab249c67ed6166ab93ec0df70e60a91834941 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Tue, 31 Aug 2021 12:02:58 +0300 Subject: [PATCH 2/2] fixed offers and discount images rendering issue --- Mohem/src/app/offersdiscount/home/home.component.html | 5 +++-- Mohem/src/app/offersdiscount/home/home.component.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html index 95508a9c..60ae686a 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.html +++ b/Mohem/src/app/offersdiscount/home/home.component.html @@ -32,9 +32,10 @@
-
+
- + +

{{key.categoryName_en}}

diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts index 3290aa8c..e7622e64 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.ts +++ b/Mohem/src/app/offersdiscount/home/home.component.ts @@ -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 { OfferDiscountService } from '../services/service'; import { IonInfiniteScroll } from '@ionic/angular'; - +import { DomSanitizer} from '@angular/platform-browser'; @Component({ selector: 'app-home', templateUrl: './home.component.html', @@ -31,7 +31,8 @@ export class HomeComponent implements AfterViewInit { public modalController: ModalController, public cs: CommonService, public offersService: OfferDiscountService, - public route: ActivatedRoute) { + public route: ActivatedRoute, + private sanitizer: DomSanitizer) { this.route .params.subscribe(val => { @@ -59,6 +60,9 @@ export class HomeComponent implements AfterViewInit { getCategories() { this.offersService.getCategories({}).subscribe((result) => { 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); }); }