diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 2f6e766c..2e63be2b 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 = Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); + this.statsButtons[3].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'); diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 91a9d1a9..66268864 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -239,7 +239,7 @@ export class HomeComponent implements OnInit { this.filters[2].value = this.totalPO; this.filters[3].value = this.totalPR; this.filters[4].value = this.totalMR; - this.filters[5].value = this.totalIC; + this.filters[6].value = this.totalIC; }); @@ -518,6 +518,10 @@ export class HomeComponent implements OnInit { } } else { this.newWorkListResponse = []; + // this.assignDataToFilters(); + if (this.showFormattedData.length === 0) { + this.resetFiltersUI(); + } this.data.datasets[0].data[4] = this.ITGCount; this.showChart = true; // this.common.stopLoading(); @@ -525,6 +529,23 @@ export class HomeComponent implements OnInit { } } + public resetFiltersUI () { + this.ngZone.run(() => { + this.filters[0].value = 0; + this.filters[1].value = 0; + this.filters[2].value = 0; + this.filters[3].value = 0; + this.filters[4].value = 0; + this.filters[6].value = 0; + + this.data.datasets[0].data[0] = 0; + this.data.datasets[0].data[1] = 0; + this.data.datasets[0].data[2] = 0; + this.data.datasets[0].data[3] = 0; + this.data.datasets[0].data[5] = 0; + }); + } + openNotificationDetail(obj) { this.common.sharedService.setSharedData(this.selectedFilter, 'selectedFilter'); this.common.sharedService.setSharedData(false, 'loadWorkList'); diff --git a/Mohem/src/app/offersdiscount/filter/filter.component.html b/Mohem/src/app/offersdiscount/filter/filter.component.html index 6fd847ce..f8391b3b 100644 --- a/Mohem/src/app/offersdiscount/filter/filter.component.html +++ b/Mohem/src/app/offersdiscount/filter/filter.component.html @@ -18,7 +18,7 @@ {{key.categoryName_ar}} - +
diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts index 02ae6873..b73c910c 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.ts +++ b/Mohem/src/app/offersdiscount/home/home.component.ts @@ -52,11 +52,12 @@ export class HomeComponent implements AfterViewInit { console.log(this.direction); let activeClass = this.cs.sharedService.getSharedData(OfferDiscountService.selected_filters); - // if (activeClass) { - // this.filterOffers(activeClass); - // } - this.getCategories(); - this.tempSearch = JSON.parse(JSON.stringify(this.offersData)); + if (activeClass) { + this.filterOffers(activeClass); + } else { + this.getCategories(); + this.tempSearch = JSON.parse(JSON.stringify(this.offersData)); + } } getCategories() { this.offersService.getCategories({}).subscribe((result) => { diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts index 5021dc79..e745209a 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts @@ -38,8 +38,8 @@ export class OfferDetailsComponent implements OnInit { console.log(this.details); const options = { message: this.stripHtml(this.details.Description), - // subject: this.stripHtml(this.details.Title), - files: ['https://www.geo.tv/assets/uploads/updates/2021-09-05/368882_8709303_updates.jpg'] + subject: this.stripHtml(this.details.Title), + files: [this.details.Banner_Image] } this.socialSharing.shareWithOptions(options).then((result) => { console.log(result); diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 6c037c2f..ee38eac2 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1609,3 +1609,8 @@ ion-segment-button { .top svg { height: 30px !important; } + + +.top-filter svg { + margin-top: 15px !important; +}