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');