[develop]: Fix a bug with subcateogory link in case of umbrella dashboards with children.

This commit is contained in:
Konstantinos Triantafyllou 2024-10-08 13:15:46 +03:00
parent bef6dda2c2
commit 3d9e0f25e1
1 changed files with 12 additions and 0 deletions

View File

@ -201,6 +201,18 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
} }
} }
protected get isChild(): boolean {
return !!this.stakeholder?.parent;
}
protected get aliasPrefix(): string {
if(this.isChild) {
return this.stakeholder.parent.alias + '/browse/' + this.stakeholder.type + '/';
} else {
return '/';
}
}
protected getFullUrl(indicatorPath: IndicatorPath) { protected getFullUrl(indicatorPath: IndicatorPath) {
let fosValues = this.getSelectedFilterValues("fos"); let fosValues = this.getSelectedFilterValues("fos");
return this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, indicatorPath,null, this.periodFilter.selectedFromValue, this.periodFilter.selectedToValue, false, fosValues?fosValues.lvl1:[],fosValues?fosValues.lvl2:[], this.getSelectedFilterValues("publiclyfunded")); return this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, indicatorPath,null, this.periodFilter.selectedFromValue, this.periodFilter.selectedToValue, false, fosValues?fosValues.lvl1:[],fosValues?fosValues.lvl2:[], this.getSelectedFilterValues("publiclyfunded"));