[develop]: Add open Access map in order to add configure open access indicator.

This commit is contained in:
Konstantinos Triantafyllou 2024-04-30 15:38:31 +03:00
parent 4231b65880
commit bc2dd7d285
2 changed files with 8 additions and 4 deletions

View File

@ -7,15 +7,14 @@ import {
IndicatorPathType,
IndicatorType,
SourceType,
Stakeholder, SubCategory,
Topic,
Stakeholder,
Visibility,
} from "../../monitor/entities/stakeholder";
import {AbstractControl, ValidatorFn, Validators} from "@angular/forms";
import {Option} from "../../sharedComponents/input/input.component";
import {Session} from "../../login/utils/helper.class";
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {properties} from "src/environments/environment";
import {OAIndicator} from "../../../shared/irish";
class Roles {
manager = 'manager';
@ -63,6 +62,7 @@ export class StakeholderConfiguration {
public static CACHE_INDICATORS: boolean = true;
public static NUMBER_MULTI_INDICATOR_PATHS = false;
public static CHART_MULTI_INDICATOR_PATHS = true;
public static openAccess: Map<string, OAIndicator> = new Map();
}
export class StakeholderUtils {
@ -102,6 +102,10 @@ export class StakeholderUtils {
return StakeholderConfiguration.CHART_MULTI_INDICATOR_PATHS;
}
get openAccess(): Map<string, OAIndicator> {
return StakeholderConfiguration.openAccess;
}
visibilityIcon: Map<Visibility, string> = new Map<Visibility, string>(this.visibilities.map(option => [option.value, option.icon]));
defaultValue(options: Option[]) {

View File

@ -207,7 +207,7 @@ export class IndicatorPath {
type: IndicatorPathType;
source: SourceType;
url: string;
safeResourceUrl: SafeResourceUrl; // initialize on front end
safeResourceUrl?: SafeResourceUrl; // initialize on front end
jsonPath: string[];
chartObject: string;
parameters: any;