diff --git a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html index 25905040fcb797792e102aea482cc2192fd9d74a..fe8a160ecdd01a23d9ca1c6c47fdbd8cbcc766b3 100644 --- a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html +++ b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html @@ -121,7 +121,7 @@ <mat-datepicker #picker></mat-datepicker> </mat-form-field> </div> - <ng-container *ngIf="pdFilters.length"> + <ng-container *ngIf="pdFilters.length && tabIndex !== 1 && tabIndex !== 2"> <ng-container *ngFor="let filter of pdFilters"> <app-pd-filters [pdFilter]="filter" (filterChanged)="pdFilterChanged($event)"></app-pd-filters> </ng-container> diff --git a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.ts b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.ts index e85529f332d6c0a19e736fb6722f6e48fdbe4f5f..66dd9de3f7d65d5832fc25d8d41375ba88a092b5 100644 --- a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.ts +++ b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.ts @@ -542,9 +542,11 @@ export class DatasetsComponent implements OnInit, OnDestroy { } districtSelection($event) { - this.globalDistrict = $event.value + this.globalDistrict = $event.value; this.reportForm.controls.districtName.setValue($event.value); this.displayFilters['District'] = [$event?.source?.triggerValue] + this.tag = _.get(this.reportForm, 'controls.solution.value')+ '_' + this.userId+'_'+ _.toLower(_.trim([$event?.source?.triggerValue]," ")); + this.loadReports(); } organisationSelection($event) { @@ -645,7 +647,6 @@ export class DatasetsComponent implements OnInit, OnDestroy { } }); - if (dataFound && dataFound.length > 0) { this.popup = false; this.isProcessed = true; @@ -707,8 +708,12 @@ export class DatasetsComponent implements OnInit, OnDestroy { let requestStatus = true; const selectedReportList = []; _.forEach(this.onDemandReportData, (value) => { - if (value.datasetConfig.type == this.selectedReport.datasetId && value.datasetConfig.params.solutionId == this.selectedSolution) { - selectedReportList.push(value); + if (value.datasetConfig.type == this.selectedReport.datasetId){ + _.forEach(value.datasetConfig.params.filters, (filter) => { + if(['solutionId','solution_id'].includes(filter['dimension']) && filter.value === this.selectedSolution){ + selectedReportList.push(value); + } + }); } }); const sortedReportList = _.sortBy(selectedReportList, [(data) => {