[develop | DONE | CHANGED] indicator utils: change if/else block for comparing queries - separate if for start/end year

This commit is contained in:
argirok 2024-06-19 10:17:02 +03:00
parent 12a94fae40
commit 51787e582a
1 changed files with 3 additions and 2 deletions

View File

@ -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;
// }