[angular-16-irish-monitor | ADDED]: Add configuration for caching indicators.

This commit is contained in:
Konstantinos Triantafyllou 2023-11-16 16:44:27 +02:00
parent 79d49c80e3
commit 3c1b72e7e4
2 changed files with 6 additions and 1 deletions

View File

@ -68,7 +68,7 @@
<li> <li>
<a (click)="editStakeholder(stakeholder, !stakeholder.defaultId); hide(element)">Edit</a> <a (click)="editStakeholder(stakeholder, !stakeholder.defaultId); hide(element)">Edit</a>
</li> </li>
<li *ngIf="isCurator"> <li *ngIf="isCurator && stakeholderUtils.isCachingIndicators">
<a (click)="createReport(stakeholder);hide(element)">Cache Indicators</a> <a (click)="createReport(stakeholder);hide(element)">Cache Indicators</a>
</li> </li>
<li *ngIf="showVisibility" class="uk-nav-divider"></li> <li *ngIf="showVisibility" class="uk-nav-divider"></li>

View File

@ -52,6 +52,7 @@ export class StakeholderConfiguration {
{icon: 'restricted', value: "RESTRICTED", label: 'Restricted'}, {icon: 'restricted', value: "RESTRICTED", label: 'Restricted'},
{icon: 'incognito', value: "PRIVATE", label: 'Private'}, {icon: 'incognito', value: "PRIVATE", label: 'Private'},
]; ];
public static CACHE_INDICATORS: boolean = true;
} }
export class StakeholderUtils { export class StakeholderUtils {
@ -75,6 +76,10 @@ export class StakeholderUtils {
return StakeholderConfiguration.VISIBILITIES; return StakeholderConfiguration.VISIBILITIES;
} }
get isCachingIndicators() {
return StakeholderConfiguration.CACHE_INDICATORS;
}
visibilityIcon: Map<Visibility, string> = new Map<Visibility, string>(this.visibilities.map(option => [option.value, option.icon])); visibilityIcon: Map<Visibility, string> = new Map<Visibility, string>(this.visibilities.map(option => [option.value, option.icon]));
defaultValue(options: Option[]) { defaultValue(options: Option[]) {