Commit 2061422c authored by 5Amogh's avatar 5Amogh
Browse files

Hotfix: Request and load status based on districts

Showing with 9 additions and 4 deletions
+9 -4
...@@ -542,9 +542,11 @@ export class DatasetsComponent implements OnInit, OnDestroy { ...@@ -542,9 +542,11 @@ export class DatasetsComponent implements OnInit, OnDestroy {
} }
districtSelection($event) { districtSelection($event) {
this.globalDistrict = $event.value this.globalDistrict = $event.value;
this.reportForm.controls.districtName.setValue($event.value); this.reportForm.controls.districtName.setValue($event.value);
this.displayFilters['District'] = [$event?.source?.triggerValue] 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) { organisationSelection($event) {
...@@ -645,7 +647,6 @@ export class DatasetsComponent implements OnInit, OnDestroy { ...@@ -645,7 +647,6 @@ export class DatasetsComponent implements OnInit, OnDestroy {
} }
}); });
if (dataFound && dataFound.length > 0) { if (dataFound && dataFound.length > 0) {
this.popup = false; this.popup = false;
this.isProcessed = true; this.isProcessed = true;
...@@ -707,8 +708,12 @@ export class DatasetsComponent implements OnInit, OnDestroy { ...@@ -707,8 +708,12 @@ export class DatasetsComponent implements OnInit, OnDestroy {
let requestStatus = true; let requestStatus = true;
const selectedReportList = []; const selectedReportList = [];
_.forEach(this.onDemandReportData, (value) => { _.forEach(this.onDemandReportData, (value) => {
if (value.datasetConfig.type == this.selectedReport.datasetId && value.datasetConfig.params.solutionId == this.selectedSolution) { if (value.datasetConfig.type == this.selectedReport.datasetId){
selectedReportList.push(value); _.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) => { const sortedReportList = _.sortBy(selectedReportList, [(data) => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment