[develop]: Monitor base component delete chartsActiveType

This commit is contained in:
Konstantinos Triantafyllou 2024-04-05 20:31:29 +03:00
parent 0fb20de588
commit e91830f2f8
1 changed files with 6 additions and 6 deletions

View File

@ -53,7 +53,6 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
minYear = Dates.currentYear - 20; minYear = Dates.currentYear - 20;
maxYear = Dates.currentYear; maxYear = Dates.currentYear;
public numberResults: Map<string, number> = new Map<string, number>(); public numberResults: Map<string, number> = new Map<string, number>();
public chartsActiveType: Map<string, IndicatorPath> = new Map<string, IndicatorPath>();
public clipboard; public clipboard;
/** Services */ /** Services */
@ -259,7 +258,6 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
section.indicators.forEach((indicator, j) => { section.indicators.forEach((indicator, j) => {
indicator.indicatorPaths.forEach((indicatorPath, k) => { indicator.indicatorPaths.forEach((indicatorPath, k) => {
indicator.indicatorPaths[k].safeResourceUrl = this.getUrlByStakeHolder(indicator.indicatorPaths[k]); indicator.indicatorPaths[k].safeResourceUrl = this.getUrlByStakeHolder(indicator.indicatorPaths[k]);
this.chartsActiveType.set(i + '-' + j + '-' + k, indicator.indicatorPaths[k]);
}); });
}); });
}); });
@ -273,10 +271,12 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
this.indicatorUtils.getChartUrl(indicatorPath.source, this.getFullUrl(indicatorPath))); this.indicatorUtils.getChartUrl(indicatorPath.source, this.getFullUrl(indicatorPath)));
} }
public setActiveChart(i: number, j: number, type: string) { public getActiveIndicatorPath(indicator: Indicator) {
let activeChart = this.activeSubCategory.charts[i].indicators[j].indicatorPaths.filter(indicatorPath => indicatorPath.type === type)[0]; if(indicator.activePath) {
activeChart.safeResourceUrl = this.getUrlByStakeHolder(activeChart); return indicator.indicatorPaths[indicator.activePath];
this.chartsActiveType.set(i + '-' + j, activeChart); } else {
return indicator.indicatorPaths[0];
}
} }
public filter() { public filter() {