diff --git a/monitor-admin/utils/indicator-utils.ts b/monitor-admin/utils/indicator-utils.ts index 5afa5b30..2cccb2a7 100644 --- a/monitor-admin/utils/indicator-utils.ts +++ b/monitor-admin/utils/indicator-utils.ts @@ -83,6 +83,11 @@ export class StakeholderUtils { return options.length > 1; } + getLabel(options: Option[], value) { + let option = options.find(option => option.value === value); + return option?option.label:null; + } + getTypesByUserRoles(user, id: string = null): Option[] { let types = []; for (let type of this.types) { diff --git a/monitor-admin/utils/stakeholder-base.component.ts b/monitor-admin/utils/stakeholder-base.component.ts index b479e3c8..98e8110a 100644 --- a/monitor-admin/utils/stakeholder-base.component.ts +++ b/monitor-admin/utils/stakeholder-base.component.ts @@ -23,6 +23,10 @@ export abstract class StakeholderBaseComponent extends BaseComponent { return this.stakeholderUtils.showField(this.stakeholderUtils.funderTypes); } + getFunderTypeLabel(value: any) { + return this.stakeholderUtils.getLabel(this.stakeholderUtils.funderTypes, value); + } + get showLocale() { return this.stakeholderUtils.showField(this.stakeholderUtils.locales); } diff --git a/monitor/monitor-indicator-stakeholder-base.component.ts b/monitor/monitor-indicator-stakeholder-base.component.ts index 65766d8d..fa999e0b 100644 --- a/monitor/monitor-indicator-stakeholder-base.component.ts +++ b/monitor/monitor-indicator-stakeholder-base.component.ts @@ -204,7 +204,6 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator //clear numbers when filters change this.numberResults.clear(); let urls: Map = new Map(); -console.log(this.activeSubCategory.numbers); this.activeSubCategory.numbers.forEach((section, i) => { section.indicators.forEach((number, j) => { if (this.hasPermission(number.visibility)) {