Move to new server
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<mat-card appearance="outlined" *ngIf="tournament">
|
||||
<mat-card-header>
|
||||
<h5>Loting voor {{ tournament.name }}</h5>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-card *ngFor="let event of tournament.events" appearance="outlined" class="m-3">
|
||||
<mat-card-header>
|
||||
<h6>Loting {{ TournamentEvent.getType(event.type) }}</h6>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-accordion multi="true">
|
||||
<mat-expansion-panel *ngFor="let group of this.event.groups">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ group.name }} <span class="badge text-bg-success">{{ group.teams.length }}</span>
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<table class="table {{ event.doublesEvent ? 'w-100' : 'w-50' }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th scope="col" class="w-25">Team 1</th>
|
||||
<th scope="col" style="width: 5%">-</th>
|
||||
<th scope="col" class="w-25">Team 2</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let match of group.rounds[0].matches">
|
||||
<td class="align-middle">{{ match.team1 | teamText }}</td>
|
||||
<td class="align-middle">-</td>
|
||||
<td class="align-middle">{{ match.team2 | teamText }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
td, th {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Tournament} from "../../model/tournament";
|
||||
import {TournamentService} from "../../service/tournament.service";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
||||
import {NgForOf, NgIf} from "@angular/common";
|
||||
import {
|
||||
MatAccordion,
|
||||
MatExpansionPanel,
|
||||
MatExpansionPanelHeader,
|
||||
MatExpansionPanelTitle
|
||||
} from "@angular/material/expansion";
|
||||
import {Event} from "../../model/event";
|
||||
import {TeamPipe} from "../../pipes/team-pipe";
|
||||
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
||||
|
||||
@Component({
|
||||
selector: 'app-tournament-draw',
|
||||
standalone: true,
|
||||
imports: [
|
||||
FullNamePipe,
|
||||
MatCard,
|
||||
NgIf,
|
||||
MatCardContent,
|
||||
MatCardHeader,
|
||||
MatExpansionPanel,
|
||||
MatExpansionPanelHeader,
|
||||
MatExpansionPanelTitle,
|
||||
NgForOf,
|
||||
TeamPipe,
|
||||
MatAccordion
|
||||
],
|
||||
providers: [
|
||||
FullNamePipe,
|
||||
TeamPipe
|
||||
],
|
||||
templateUrl: './tournament-draw.component.html',
|
||||
styleUrl: './tournament-draw.component.scss'
|
||||
})
|
||||
export class TournamentDrawComponent implements OnInit {
|
||||
|
||||
tournament: Tournament;
|
||||
|
||||
constructor(
|
||||
private tournamentService: TournamentService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
const id = this.route.snapshot.paramMap.get('id');
|
||||
this.tournamentService.draw(Number(id)).subscribe(data => {
|
||||
this.tournament = data;
|
||||
})
|
||||
}
|
||||
|
||||
protected readonly TournamentEvent = Event;
|
||||
}
|
||||
Reference in New Issue
Block a user