From 51787e582a0f95c44a116df23dadb87ebc4bd7de Mon Sep 17 00:00:00 2001 From: argirok Date: Wed, 19 Jun 2024 10:17:02 +0300 Subject: [PATCH] [develop | DONE | CHANGED] indicator utils: change if/else block for comparing queries - separate if for start/end year --- monitor-admin/utils/indicator-utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monitor-admin/utils/indicator-utils.ts b/monitor-admin/utils/indicator-utils.ts index de473d15..d54c81e5 100644 --- a/monitor-admin/utils/indicator-utils.ts +++ b/monitor-admin/utils/indicator-utils.ts @@ -578,10 +578,11 @@ export class IndicatorUtils { } newJsonObject[this.getDescriptionObjectName(newJsonObject)]["colors"][queryIndex] = inActiveColors[queryIndex]; filterApplied = true; - } else if (filterType == "start_year" || filterType == "end_year") { + } + if (filterType == "start_year" || filterType == "end_year") { //if has date filter already // if (filterType == "start_year" && parseInt(filterValue) > parseInt(queries["query"]["filters"][filterposition.filter]['groupFilters'][filterposition.groupFilter]["values"][0])) { - queries["query"]["filters"][filterposition.filter]['groupFilters'][filterposition.groupFilter]["values"][0] = filterValue; + //queries["query"]["filters"][filterposition.filter]['groupFilters'][filterposition.groupFilter]["values"][0] = filterValue; // } else if (filterType == "end_year" && parseInt(filterValue) < parseInt(queries["query"]["filters"][filterposition.filter]['groupFilters'][filterposition.groupFilter]["values"][0])) { queries["query"]["filters"][filterposition.filter]['groupFilters'][filterposition.groupFilter]["values"][0] = filterValue; // }