[develop]: Add statsProfile in indicatorPath.

This commit is contained in:
Konstantinos Triantafyllou 2024-02-21 14:32:14 +02:00
parent 35323bd744
commit 45a9737d84
2 changed files with 8 additions and 3 deletions

View File

@ -317,7 +317,9 @@ export class IndicatorUtils {
public getFullUrl(stakeholder: Stakeholder, indicatorPath: IndicatorPath, fundingL0: string = null, startYear: string = null, endYear: string = null): string {
let replacedUrl = indicatorPath.chartObject ? indicatorPath.chartObject : indicatorPath.url;
if (stakeholder.statsProfile) {
if(indicatorPath.statsProfile) {
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(indicatorPath.statsProfile)
} else if (stakeholder.statsProfile) {
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(stakeholder.statsProfile)
}
if (indicatorPath.parameters) {
@ -396,8 +398,10 @@ export class IndicatorUtils {
let filterSubtitleText = [];
indicatorPath.filtersApplied = 0;
let replacedUrl = indicatorPath.chartObject ? indicatorPath.chartObject : indicatorPath.url;
if (stakeholder.statsProfile) {
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(stakeholder.statsProfile);
if(indicatorPath.statsProfile) {
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(indicatorPath.statsProfile)
} else if (stakeholder.statsProfile) {
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(stakeholder.statsProfile)
}
if (fundingL0) {
if (indicatorPath.source == "stats-tool" && indicatorPath.chartObject) {

View File

@ -210,6 +210,7 @@ export class IndicatorPath {
parameters: any;
filters: any;
filtersApplied: number = 0;
statsProfile: string;
format: Format;
constructor(type: IndicatorPathType, source: SourceType, url: string, chartObject: string, jsonPath: string[], format: Format = 'NUMBER') {