From c99edac162bcb44d7d160c0ddcea08575289594c Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Tue, 31 May 2022 14:09:07 +0300 Subject: [PATCH] bug fix --- Mohem/src/app/hmg-common/services/common/common.service.ts | 2 +- Mohem/src/app/home/home.page.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 46229ced..62a7dae3 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1584,7 +1584,7 @@ export class CommonService { public totalCounter = 0; getTotalNumberOfWorklistRequest() { this.totalCounter = parseInt(this.sharedService.getSharedData('total-count', false)); - return this.totalCounter; + return this.totalCounter ? this.totalCounter : 0; } setTotalNumberOfWorklistRequest() { if (this.totalCounter > 0) { diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 098458d0..bf34dab7 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -676,6 +676,7 @@ export class HomePage implements OnInit { this.common.filterKeys['ITG'] = result.TotalCount; this.statsButtons[1].statsValue = Math.floor(this.countAllNotification + result.TotalCount); + this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count'); this.common.stopLoading(); }); }