From 693b4d2270fc418a170174b96cfc5056723f5f38 Mon Sep 17 00:00:00 2001 From: Software Magico Date: Sun, 12 May 2024 17:36:48 +0200 Subject: [PATCH] Fixing sonarqube issue --- frontend/src/app/app-routing.module.ts | 2 +- frontend/src/app/components/charts/colors.ts | 2 +- .../gauge-chart/gauge-chart.component.ts | 4 +-- .../fight-statistics-panel.component.ts | 2 +- .../app/components/fight/fight.component.ts | 2 +- .../team-ranking/team-ranking.component.ts | 4 +-- .../tournament-brackets-editor.component.ts | 34 ++++++------------- .../group-container.component.ts | 7 ++-- .../shiaijo/shiaijo.component.scss | 0 .../shiaijo/shiaijo.component.ts | 3 +- .../tournament-brackets.component.ts | 4 +-- .../tournament-brackets.module.ts | 2 +- .../untie-fight/untie-fight.component.scss | 2 -- .../interceptors/invalid-jwt-interceptor.ts | 4 +-- .../local-error-handler.service.ts | 1 - .../src/app/interceptors/logged-in.service.ts | 2 +- .../src/app/models/league-fights-order.ts | 2 -- frontend/src/app/services/file.service.ts | 2 +- .../src/app/services/group-link.service.ts | 2 -- frontend/src/app/services/login.service.ts | 1 - .../league-generator.component.ts | 3 +- .../tournament-generator.module.ts | 7 ++-- ...ticipant-picture-dialog-box.component.html | 2 +- .../views/passwords/passwords.component.ts | 4 +-- .../tournament-score-editor.component.ts | 2 +- frontend/src/assets/achievements/daruma.svg | 14 ++++---- .../src/assets/achievements/first_blood.svg | 14 ++++---- .../src/assets/achievements/love_sharing.svg | 14 ++++---- ...h_apprentices_always_kill_their_master.svg | 14 ++++---- .../src/assets/achievements/terminator.svg | 22 ++++++------ .../assets/achievements/v_for_vendetta.svg | 14 ++++---- frontend/src/assets/icons/affection.svg | 14 ++++---- frontend/src/assets/icons/brackets.svg | 14 ++++---- frontend/src/assets/icons/clone.svg | 14 ++++---- frontend/src/assets/icons/crown.svg | 14 ++++---- frontend/src/assets/icons/one-winner.svg | 14 ++++---- frontend/src/assets/icons/two-winners.svg | 14 ++++---- frontend/src/assets/icons/zip-file.svg | 14 ++++---- frontend/src/assets/img/kote.svg | 19 +++++------ 39 files changed, 143 insertions(+), 166 deletions(-) delete mode 100644 frontend/src/app/components/tournament-brackets-editor/tournament-brackets/shiaijo/shiaijo.component.scss diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index a0abf435d..2b0d5bd5c 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -1,7 +1,7 @@ import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {ClubListComponent} from "./views/club-list/club-list.component"; -import {LoggedIn, LoggedInService} from './interceptors/logged-in.service'; +import {LoggedIn} from './interceptors/logged-in.service'; import {LoginComponent} from './views/login/login.component'; import {AuthenticatedUserListComponent} from "./views/authenticated-user-list/authenticated-user-list.component"; import {PasswordsComponent} from "./views/passwords/passwords.component"; diff --git a/frontend/src/app/components/charts/colors.ts b/frontend/src/app/components/charts/colors.ts index a78a21500..01102474e 100644 --- a/frontend/src/app/components/charts/colors.ts +++ b/frontend/src/app/components/charts/colors.ts @@ -1,5 +1,5 @@ export class Colors { - public static defaultPalette: string[] = [ + public static readonly defaultPalette: string[] = [ "#001239", "#6f8bff", "#8097b3", diff --git a/frontend/src/app/components/charts/gauge-chart/gauge-chart.component.ts b/frontend/src/app/components/charts/gauge-chart/gauge-chart.component.ts index c210bac06..65897257c 100644 --- a/frontend/src/app/components/charts/gauge-chart/gauge-chart.component.ts +++ b/frontend/src/app/components/charts/gauge-chart/gauge-chart.component.ts @@ -66,8 +66,8 @@ export class GaugeChartComponent extends CustomChartComponent { this.chartOptions = { colors: this.colors, chart: this.getChart('radialBar', this.width, this.height, this.shadow, this.showToolbar), - series: this.data!.getValues(), - labels: this.data!.getLabels(), + series: this.data.getValues(), + labels: this.data.getLabels(), fill: this.getFill(this.fill, this.opacity), plotOptions: this.getPlotOptions(), tooltip: this.getTooltip(), diff --git a/frontend/src/app/components/fight-statistics-panel/fight-statistics-panel.component.ts b/frontend/src/app/components/fight-statistics-panel/fight-statistics-panel.component.ts index 6dbd6604d..53d69279d 100644 --- a/frontend/src/app/components/fight-statistics-panel/fight-statistics-panel.component.ts +++ b/frontend/src/app/components/fight-statistics-panel/fight-statistics-panel.component.ts @@ -30,7 +30,7 @@ export class FightStatisticsPanelComponent extends KendoComponent implements OnI ngOnInit(): void { this.statisticsChangedService.areStatisticsChanged.pipe(takeUntil(this.destroySubject)).subscribe(() => { - if (this.tournament && this.tournament.id) { + if (this.tournament?.id) { this.statisticsServices.getFightStatistics(this.tournament.id, !this.teams, this.teams).subscribe((_fightStatistics) => { if (_fightStatistics === undefined || _fightStatistics === null) { _fightStatistics = new TournamentFightStatistics(); diff --git a/frontend/src/app/components/fight/fight.component.ts b/frontend/src/app/components/fight/fight.component.ts index da022fd4b..aaae07b0c 100644 --- a/frontend/src/app/components/fight/fight.component.ts +++ b/frontend/src/app/components/fight/fight.component.ts @@ -45,7 +45,7 @@ export class FightComponent extends RbacBasedComponent implements OnInit { ngOnInit(): void { this.duelChangedService.isDuelUpdated.pipe(takeUntil(this.destroySubject)).subscribe(selectedDuel => { - if (selectedDuel && this.fight && this.fight.duels) { + if (selectedDuel && this.fight?.duels) { this.selected = false; this.selectedDuel = undefined; for (let duel of this.fight.duels) { diff --git a/frontend/src/app/components/team-ranking/team-ranking.component.ts b/frontend/src/app/components/team-ranking/team-ranking.component.ts index 9e3d4579f..f6ebaaf42 100644 --- a/frontend/src/app/components/team-ranking/team-ranking.component.ts +++ b/frontend/src/app/components/team-ranking/team-ranking.component.ts @@ -51,7 +51,7 @@ export class TeamRankingComponent extends RbacBasedComponent implements OnInit { if (this.tournament) { if (this.tournament.type == TournamentType.CHAMPIONSHIP) { if (this.group) { - const rankingRequest: Observable = this.rankingService.getTeamsScoreRankingByGroup(this.group!.id!); + const rankingRequest: Observable = this.rankingService.getTeamsScoreRankingByGroup(this.group.id!); const winnersRequest: Observable = this.tournamentExtendedPropertiesService.getByTournamentAndKey(this.tournament, TournamentExtraPropertyKey.NUMBER_OF_WINNERS); forkJoin([rankingRequest, winnersRequest]).subscribe(([_scoresOfTeams, _numberOfWinners]): void => { @@ -107,7 +107,7 @@ export class TeamRankingComponent extends RbacBasedComponent implements OnInit { downloadPDF(): void { if (this.tournament) { if (this.tournament.type == TournamentType.CHAMPIONSHIP && this.group) { - this.rankingService.getTeamsScoreRankingByGroupAsPdf(this.group!.id!).subscribe((pdf: Blob): void => { + this.rankingService.getTeamsScoreRankingByGroupAsPdf(this.group.id!).subscribe((pdf: Blob): void => { const blob: Blob = new Blob([pdf], {type: 'application/pdf'}); const downloadURL: string = window.URL.createObjectURL(blob); const anchor: HTMLAnchorElement = document.createElement("a"); diff --git a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets-editor.component.ts b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets-editor.component.ts index 4c16cdc39..0e3da1a7c 100644 --- a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets-editor.component.ts +++ b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets-editor.component.ts @@ -1,15 +1,4 @@ -import { - Component, - ElementRef, - EventEmitter, - Input, - OnChanges, - OnDestroy, - OnInit, - Output, - SimpleChanges, - ViewChild -} from '@angular/core'; +import {Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core'; import {Group} from "../../models/group"; import {CdkDragDrop, transferArrayItem} from "@angular/cdk/drag-drop"; import {Team} from "../../models/team"; @@ -102,7 +91,6 @@ export class TournamentBracketsEditorComponent implements OnInit, OnDestroy { }); this.topicSubscription = this.rxStompService.watch(this.websocketsPrefix + '/groups').subscribe((message: Message): void => { const messageContent: MessageContent = JSON.parse(message.body); - //if (messageContent.topic == "Group" && messageContent.actor !== localStorage.getItem("username")) { if (messageContent.topic == "Group") { this.updateData(false); } @@ -121,10 +109,10 @@ export class TournamentBracketsEditorComponent implements OnInit, OnDestroy { updateData(showBusy: boolean): void { this.systemOverloadService.isBusy.next(showBusy); - if (this.tournament && this.tournament.id) { + if (this.tournament?.id) { const teamsRequest: Observable = this.teamService.getFromTournament(this.tournament); - const groupsRequest: Observable = this.groupService.getFromTournament(this.tournament.id!); - const relationsRequest: Observable = this.groupLinkService.getFromTournament(this.tournament.id!); + const groupsRequest: Observable = this.groupService.getFromTournament(this.tournament.id); + const relationsRequest: Observable = this.groupLinkService.getFromTournament(this.tournament.id); forkJoin([teamsRequest, groupsRequest, relationsRequest]).subscribe(([_teams, _groups, _groupRelations]): void => { if (_teams) { @@ -163,10 +151,10 @@ export class TournamentBracketsEditorComponent implements OnInit, OnDestroy { const relations: Map = new Map(); if (groupRelations) { for (const groupLink of groupRelations) { - if (!relations.get(groupLink.source!.level!)) { - relations.set(groupLink.source!.level!, []); + if (!relations.get(groupLink.source.level!)) { + relations.set(groupLink.source.level!, []); } - relations.get(groupLink.source!.level!)?.push({ + relations.get(groupLink.source.level!)?.push({ src: groupLink.source!.index!, dest: groupLink.destination!.index!, winner: groupLink.winner @@ -184,7 +172,7 @@ export class TournamentBracketsEditorComponent implements OnInit, OnDestroy { event.previousIndex, event.currentIndex, ); - this.groupService.deleteTeamsFromTournament(this.tournament!.id!, this.teamListData.teams).subscribe(); + this.groupService.deleteTeamsFromTournament(this.tournament.id!, this.teamListData.teams).subscribe(); this.teamListData.filteredTeams.sort((a: Team, b: Team) => a.name.localeCompare(b.name)); this.teamListData.teams.sort((a: Team, b: Team) => a.name.localeCompare(b.name)); } @@ -227,7 +215,7 @@ export class TournamentBracketsEditorComponent implements OnInit, OnDestroy { const groupsByLevel: Map = TournamentBracketsComponent.convert(this.groups); const height: number = groupsByLevel.get(0)?.length! * BracketsMeasures.GROUP_SEPARATION + this.totalTeams * 100; //const width = Math.max(groupsByLevel.size!, 3) * 500 + 100; - const width: number = (groupsByLevel.size! + 1) * (BracketsMeasures.GROUP_WIDTH + BracketsMeasures.LEVEL_SEPARATION + 100); + const width: number = (groupsByLevel.size + 1) * (BracketsMeasures.GROUP_WIDTH + BracketsMeasures.LEVEL_SEPARATION + 100); const orientation: "p" | "portrait" | "l" | "landscape" = "landscape"; const imageUnit: "pt" | "px" | "in" | "mm" | "cm" | "ex" | "em" | "pc" = "px"; const widthMM: number = this.getMM(width); @@ -305,7 +293,7 @@ export class TournamentBracketsEditorComponent implements OnInit, OnDestroy { //Send final teams let observables: Observable[] = []; for (const group of groups) { - observables.push(this.groupService.addTeamsToGroup(group!.id!, group.teams)); + observables.push(this.groupService.addTeamsToGroup(group.id!, group.teams)); } //Ensure all groups are updated. forkJoin(observables) @@ -332,7 +320,7 @@ export class TournamentBracketsEditorComponent implements OnInit, OnDestroy { } removeAllTeams(): void { - this.groupService.deleteAllTeamsFromTournament(this.tournament!.id!).subscribe((_groups: Group[]): void => { + this.groupService.deleteAllTeamsFromTournament(this.tournament.id!).subscribe((_groups: Group[]): void => { this.groupsUpdatedService.areTeamListUpdated.next([]); }) } diff --git a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/group-container/group-container.component.ts b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/group-container/group-container.component.ts index 789aaa71d..04e2f86f4 100644 --- a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/group-container/group-container.component.ts +++ b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/group-container/group-container.component.ts @@ -2,7 +2,6 @@ import {Component, Input, OnInit} from '@angular/core'; import {CdkDrag, CdkDragDrop, CdkDropList, transferArrayItem} from "@angular/cdk/drag-drop"; import {Team} from "../../../../models/team"; import {Group} from "../../../../models/group"; -import {TournamentBracketsComponent} from "../tournament-brackets.component"; import {GroupService} from "../../../../services/group.service"; import {GroupsUpdatedService} from "../groups-updated.service"; import {Tournament} from "../../../../models/tournament"; @@ -57,11 +56,11 @@ export class GroupContainerComponent implements OnInit { } dropTeam(event: CdkDragDrop): void { - const team: Team = this.transferCard(event); + this.transferCard(event); this.groupHigh = this.getGroupHigh(this.level, this.index); - this.groupService.setTeamsToGroup(this.groupsByLevel!.get(this.level)![this.index]!.id!, this.groupsByLevel.get(this.level)![this.index].teams) + this.groupService.setTeamsToGroup(this.groupsByLevel.get(this.level)![this.index]!.id!, this.groupsByLevel.get(this.level)![this.index].teams) .subscribe((_group: Group): void => { - this.groupsByLevel!.get(this.level)![this.index] = _group; + this.groupsByLevel.get(this.level)![this.index] = _group; }) } diff --git a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/shiaijo/shiaijo.component.scss b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/shiaijo/shiaijo.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/shiaijo/shiaijo.component.ts b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/shiaijo/shiaijo.component.ts index be2123e3c..dc5456fb3 100644 --- a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/shiaijo/shiaijo.component.ts +++ b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/shiaijo/shiaijo.component.ts @@ -7,8 +7,7 @@ import {Tournament} from "../../../../models/tournament"; @Component({ selector: 'app-shiaijo', - templateUrl: './shiaijo.component.html', - styleUrls: ['./shiaijo.component.scss'] + templateUrl: './shiaijo.component.html' }) export class ShiaijoComponent { diff --git a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/tournament-brackets.component.ts b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/tournament-brackets.component.ts index 56baeac1f..72ab19590 100644 --- a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/tournament-brackets.component.ts +++ b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/tournament-brackets.component.ts @@ -59,7 +59,7 @@ export class TournamentBracketsComponent implements OnInit { } getGroupHigh(level: number, index: number): number { - if (this.groupsByLevel && this.groupsByLevel!.get(level) && this.groupsByLevel.get(level)![index]) { + if (this.groupsByLevel?.get(level) && this.groupsByLevel.get(level)![index]) { const estimatedTeams: number = Math.ceil(this.totalTeams / this.groupsByLevel.get(0)!.length); let teams: number = -1; for (const i of this.groupsByLevel.get(level)!.keys()) { @@ -81,7 +81,7 @@ export class TournamentBracketsComponent implements OnInit { if (level == 0) { return group * (BracketsMeasures.GROUP_SEPARATION + this.getGroupHigh(level, group)); } - if (groupsByLevel && groupsByLevel.get(0) && groupsByLevel.get(level)) { + if (groupsByLevel?.get(0) && groupsByLevel?.get(level)) { const maxHeight: number = groupsByLevel.get(0)!.length * (this.getGroupHigh(0, group) + BracketsMeasures.GROUP_SEPARATION); const portion: number = (maxHeight / groupsByLevel.get(level)!.length); return (portion * (group + 1)) - portion / 2 - this.getGroupHigh(level, group) / 2 - BracketsMeasures.GROUP_SEPARATION / 2 diff --git a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/tournament-brackets.module.ts b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/tournament-brackets.module.ts index 9938b43b8..1b26c936f 100644 --- a/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/tournament-brackets.module.ts +++ b/frontend/src/app/components/tournament-brackets-editor/tournament-brackets/tournament-brackets.module.ts @@ -3,7 +3,7 @@ import {CommonModule} from '@angular/common'; import {TournamentBracketsComponent} from "./tournament-brackets.component"; import {ArrowModule} from "./arrow/arrow.module"; import {DragDropModule} from "@angular/cdk/drag-drop"; -import { GroupContainerComponent } from './group-container/group-container.component'; +import {GroupContainerComponent} from './group-container/group-container.component'; import {TeamCardModule} from "../../team-card/team-card.module"; import {ShiaijoModule} from "./shiaijo/shiaijo.module"; diff --git a/frontend/src/app/components/untie-fight/untie-fight.component.scss b/frontend/src/app/components/untie-fight/untie-fight.component.scss index 77d860958..434d3a7c8 100644 --- a/frontend/src/app/components/untie-fight/untie-fight.component.scss +++ b/frontend/src/app/components/untie-fight/untie-fight.component.scss @@ -75,7 +75,5 @@ border-style: solid; box-shadow: 0 5px 10px 0 rgba(0, 18, 57, 0.5); transition: transform .2s; /* Animation */ - //Transform causes problem with the timer component z-index. - //transform: scale(1.03); background: white; } diff --git a/frontend/src/app/interceptors/invalid-jwt-interceptor.ts b/frontend/src/app/interceptors/invalid-jwt-interceptor.ts index ba2a87012..c47cd006c 100644 --- a/frontend/src/app/interceptors/invalid-jwt-interceptor.ts +++ b/frontend/src/app/interceptors/invalid-jwt-interceptor.ts @@ -1,5 +1,5 @@ import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from "@angular/common/http"; -import {Observable, throwError} from "rxjs"; +import {Observable} from "rxjs"; import {Router} from "@angular/router"; import {Injectable} from "@angular/core"; import {catchError} from "rxjs/operators"; @@ -15,7 +15,7 @@ export class InvalidJwtInterceptor implements HttpInterceptor { intercept(request: HttpRequest, next: HttpHandler): Observable> { return next.handle(request).pipe( - catchError((error) => { + catchError((error): void => { //If on JWT, the IP is changed, launch a 409 error. 401 and 423 are for invalid or expired jwt. As Jwt is invalid now, logging again. if (error.status === 409 || error.status === 401 || error.status === 423) { this.loginService.logout(); diff --git a/frontend/src/app/interceptors/local-error-handler.service.ts b/frontend/src/app/interceptors/local-error-handler.service.ts index df8c431c3..c08fe38f6 100644 --- a/frontend/src/app/interceptors/local-error-handler.service.ts +++ b/frontend/src/app/interceptors/local-error-handler.service.ts @@ -18,6 +18,5 @@ export class LocalErrorHandler implements ErrorHandler { //Show error this.messageService.errorMessage(`Error connecting to the backend service. ${error.url} failed: ${error ? error.message : ""}`); } - //this.loggerService.error(error.message); } } diff --git a/frontend/src/app/interceptors/logged-in.service.ts b/frontend/src/app/interceptors/logged-in.service.ts index 11378f58a..8a03b4363 100644 --- a/frontend/src/app/interceptors/logged-in.service.ts +++ b/frontend/src/app/interceptors/logged-in.service.ts @@ -1,5 +1,5 @@ import {inject, Injectable} from '@angular/core'; -import {ActivatedRouteSnapshot, CanActivate, CanActivateFn, Router, RouterStateSnapshot} from '@angular/router'; +import {ActivatedRouteSnapshot, CanActivateFn, Router, RouterStateSnapshot} from '@angular/router'; import {LoginService} from "../services/login.service"; import {BehaviorSubject} from "rxjs"; import {TournamentService} from "../services/tournament.service"; diff --git a/frontend/src/app/models/league-fights-order.ts b/frontend/src/app/models/league-fights-order.ts index 04a79f14d..7340eef96 100644 --- a/frontend/src/app/models/league-fights-order.ts +++ b/frontend/src/app/models/league-fights-order.ts @@ -1,5 +1,3 @@ -import {DrawResolution} from "./draw-resolution"; - export enum LeagueFightsOrder { FIFO = 'FIFO', LIFO = 'LIFO', diff --git a/frontend/src/app/services/file.service.ts b/frontend/src/app/services/file.service.ts index 88a694322..0b2eb3ea1 100644 --- a/frontend/src/app/services/file.service.ts +++ b/frontend/src/app/services/file.service.ts @@ -1,5 +1,5 @@ import {Injectable} from '@angular/core'; -import {HttpClient, HttpHeaders} from "@angular/common/http"; +import {HttpClient} from "@angular/common/http"; import {EnvironmentService} from "../environment.service"; import {MessageService} from "./message.service"; import {LoggerService} from "./logger.service"; diff --git a/frontend/src/app/services/group-link.service.ts b/frontend/src/app/services/group-link.service.ts index 434e437a9..88a51dba9 100644 --- a/frontend/src/app/services/group-link.service.ts +++ b/frontend/src/app/services/group-link.service.ts @@ -6,10 +6,8 @@ import {LoggerService} from "./logger.service"; import {LoginService} from "./login.service"; import {SystemOverloadService} from "./notifications/system-overload.service"; import {Observable} from "rxjs"; -import {Group} from "../models/group"; import {catchError, tap} from "rxjs/operators"; import {GroupLink} from "../models/group-link.model"; -import {Tournament} from "../models/tournament"; @Injectable({ providedIn: 'root' diff --git a/frontend/src/app/services/login.service.ts b/frontend/src/app/services/login.service.ts index 64dce636b..d62cf311c 100644 --- a/frontend/src/app/services/login.service.ts +++ b/frontend/src/app/services/login.service.ts @@ -11,7 +11,6 @@ import {Router} from "@angular/router"; import {ActivityService} from "./rbac/activity.service"; import {AuthGuestRequest} from "./models/auth-guest-request"; import {TemporalToken} from "./models/temporal-token"; -import {Participant} from "../models/participant"; @Injectable({ providedIn: 'root' diff --git a/frontend/src/app/views/fight-list/league-generator/league-generator.component.ts b/frontend/src/app/views/fight-list/league-generator/league-generator.component.ts index 40a6ce3a5..8440b1328 100644 --- a/frontend/src/app/views/fight-list/league-generator/league-generator.component.ts +++ b/frontend/src/app/views/fight-list/league-generator/league-generator.component.ts @@ -210,7 +210,8 @@ export class LeagueGeneratorComponent extends RbacBasedComponent implements OnIn //Sort map and assign: this.teamsOrder = []; - const sortedTeams: Map = new Map([...teamsScore.entries()].sort()); + const sortedTeams: Map = new Map([...teamsScore.entries()].sort( + (a: [number, Team], b: [number, Team]) => a[0] - b[0])); this.teamsOrder.push(...sortedTeams.values()); this.teamListData.teams = []; this.teamListData.filteredTeams = []; diff --git a/frontend/src/app/views/fight-list/tournament-generator/tournament-generator.module.ts b/frontend/src/app/views/fight-list/tournament-generator/tournament-generator.module.ts index 7de58c26b..f36f72dbf 100644 --- a/frontend/src/app/views/fight-list/tournament-generator/tournament-generator.module.ts +++ b/frontend/src/app/views/fight-list/tournament-generator/tournament-generator.module.ts @@ -1,6 +1,6 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { TournamentGeneratorComponent } from './tournament-generator.component'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {TournamentGeneratorComponent} from './tournament-generator.component'; import { TournamentBracketsEditorModule } from "../../../components/tournament-brackets-editor/tournament-brackets-editor.module"; @@ -13,7 +13,6 @@ import {TranslateModule} from "@ngx-translate/core"; import {MatDividerModule} from "@angular/material/divider"; - @NgModule({ declarations: [ TournamentGeneratorComponent diff --git a/frontend/src/app/views/participant-list/participant-dialog-box/participant-picture/participant-picture-dialog-box.component.html b/frontend/src/app/views/participant-list/participant-dialog-box/participant-picture/participant-picture-dialog-box.component.html index de334a6d9..bbd27074c 100644 --- a/frontend/src/app/views/participant-list/participant-dialog-box/participant-picture/participant-picture-dialog-box.component.html +++ b/frontend/src/app/views/participant-list/participant-dialog-box/participant-picture/participant-picture-dialog-box.component.html @@ -12,7 +12,7 @@ diff --git a/frontend/src/app/views/passwords/passwords.component.ts b/frontend/src/app/views/passwords/passwords.component.ts index 0851220e8..5f286c8ec 100644 --- a/frontend/src/app/views/passwords/passwords.component.ts +++ b/frontend/src/app/views/passwords/passwords.component.ts @@ -1,10 +1,10 @@ import {Component, OnInit} from '@angular/core'; import { AbstractControl, - UntypedFormControl, - UntypedFormGroup, FormGroupDirective, NgForm, + UntypedFormControl, + UntypedFormGroup, ValidationErrors, ValidatorFn, Validators diff --git a/frontend/src/app/views/tournament-list/tournament-dialog-box/tournament-score-editor/tournament-score-editor.component.ts b/frontend/src/app/views/tournament-list/tournament-dialog-box/tournament-score-editor/tournament-score-editor.component.ts index 4f07ae365..f6a06df0b 100644 --- a/frontend/src/app/views/tournament-list/tournament-dialog-box/tournament-score-editor/tournament-score-editor.component.ts +++ b/frontend/src/app/views/tournament-list/tournament-dialog-box/tournament-score-editor/tournament-score-editor.component.ts @@ -1,4 +1,4 @@ -import {Component, Inject, OnInit, Optional} from '@angular/core'; +import {Component, Inject, Optional} from '@angular/core'; import {RbacBasedComponent} from "../../../../components/RbacBasedComponent"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {Tournament} from "../../../../models/tournament"; diff --git a/frontend/src/assets/achievements/daruma.svg b/frontend/src/assets/achievements/daruma.svg index e8bf385a7..669179779 100644 --- a/frontend/src/assets/achievements/daruma.svg +++ b/frontend/src/assets/achievements/daruma.svg @@ -2,13 +2,13 @@ + width="150" + height="150" + viewBox="0 0 39.6875 39.6875" + version="1.1" + id="svg1168" + xmlns="http://www.w3.org/2000/svg" +> + width="200" + height="200" + viewBox="0 0 52.91667 52.916669" + version="1.1" + id="svg8" + xmlns="http://www.w3.org/2000/svg" +> + width="150" + height="150" + viewBox="0 0 39.6875 39.6875" + version="1.1" + id="svg1168" + xmlns="http://www.w3.org/2000/svg" +> + width="150" + height="150" + viewBox="0 0 39.6875 39.6875" + version="1.1" + id="svg1168" + xmlns="http://www.w3.org/2000/svg" +> + width="150" + height="150" + viewBox="0 0 39.6875 39.6875" + version="1.1" + id="svg1168" + sodipodi:docname="terminator.svg" + inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" +> + width="150" + height="150" + viewBox="0 0 39.6875 39.6875" + version="1.1" + id="svg1168" + xmlns="http://www.w3.org/2000/svg" +> + width="200" + height="200" + viewBox="0 0 52.91667 52.916669" + version="1.1" + id="svg8" + xmlns="http://www.w3.org/2000/svg" +> + id="svg8" + version="1.1" + viewBox="0 0 200 200" + height="200mm" + width="200mm" + xmlns="http://www.w3.org/2000/svg" +> + id="svg8" + version="1.1" + viewBox="0 0 200 200" + height="200mm" + width="200mm" + xmlns="http://www.w3.org/2000/svg" +> + id="svg8" + version="1.1" + viewBox="0 0 200 200" + height="200mm" + width="200mm" + xmlns="http://www.w3.org/2000/svg" +> + width="200" + height="200" + viewBox="0 0 52.91667 52.916669" + version="1.1" + id="svg8" + xmlns="http://www.w3.org/2000/svg" +> + width="200" + height="200" + viewBox="0 0 52.91667 52.916669" + version="1.1" + id="svg8" + xmlns="http://www.w3.org/2000/svg" +> + width="200" + height="200" + viewBox="0 0 52.91667 52.916669" + version="1.1" + id="svg8" + xmlns="http://www.w3.org/2000/svg" +> + id="svg8" + version="1.1" + viewBox="0 0 284.80026 284.80027" + height="284.80026mm" + width="284.80026mm" + xmlns="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/">