diff --git a/README.md b/README.md index 7b69a9eec..23db48e40 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![GitHub last commit](https://img.shields.io/github/last-commit/softwaremagico/KendoTournamentManager)](https://github.com/softwaremagico/KendoTournamentManager) [![Issues](https://img.shields.io/github/issues/softwaremagico/KendoTournamentManager.svg)](https://github.com/softwaremagico/KendoTournamentManager/issues) [![CircleCI](https://circleci.com/gh/softwaremagico/KendoTournamentManager.svg?style=shield)](https://circleci.com/gh/softwaremagico/KendoTournamentManager) -[![Time](https://img.shields.io/badge/development-713h-blueviolet.svg)]() +[![Time](https://img.shields.io/badge/development-716h-blueviolet.svg)]() [![Powered by](https://img.shields.io/badge/powered%20by%20java-orange.svg?logo=OpenJDK&logoColor=white)]() [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=kendo-tournament-backend&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=kendo-tournament-backend) diff --git a/frontend/src/app/views/tournament-statistics/tournament-statistics.component.ts b/frontend/src/app/views/tournament-statistics/tournament-statistics.component.ts index 6039b52c3..b92fa813f 100644 --- a/frontend/src/app/views/tournament-statistics/tournament-statistics.component.ts +++ b/frontend/src/app/views/tournament-statistics/tournament-statistics.component.ts @@ -29,7 +29,7 @@ import {Achievement} from "../../models/achievement.model"; import {AchievementsService} from "../../services/achievements.service"; import {Tournament} from "../../models/tournament"; import {TournamentService} from "../../services/tournament.service"; -import {Environment} from "../../../environments/environment"; +import {EnvironmentService} from "../../environment.service"; @Component({ selector: 'app-tournament-statistics', @@ -48,7 +48,7 @@ export class TournamentStatisticsComponent extends RbacBasedComponent implements public hitsByTournament: StackedBarChartData = new StackedBarChartData(); public fightsOverData: GaugeChartData; - protected achievementsEnabled: boolean = JSON.parse(String(Environment.achievementsEnabled)); + protected achievementsEnabled: boolean = this.environmentService.isAchievementsEnabled(); private readonly tournamentId: number | undefined; public tournamentStatistics: TournamentStatistics | undefined = undefined; @@ -77,7 +77,7 @@ export class TournamentStatisticsComponent extends RbacBasedComponent implements private statisticsService: StatisticsService, private userSessionService: UserSessionService, private rankingService: RankingService, private nameUtilsService: NameUtilsService, private translateService: TranslateService, private achievementService: AchievementsService, - private tournamentService: TournamentService) { + private tournamentService: TournamentService, private environmentService: EnvironmentService) { super(rbacService); let state = this.router.getCurrentNavigation()?.extras.state; if (state) {