Move to new server

This commit is contained in:
2024-10-12 13:38:41 +02:00
commit e2e855e9b9
113 changed files with 11268 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'fullName',
standalone: true
})
export class FullNamePipe implements PipeTransform {
transform(person: any, args?: any): any {
if (person) {
return [person.firstName, person.middleName, person.lastName].join(" ");
} else {
return "";
}
}
}

View File

@@ -0,0 +1,17 @@
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: 'matchResult',
standalone: true
})
export class MatchResultPipe implements PipeTransform {
transform(match: any, args?: any): any {
let result = `${match.games[0].score1} ${match.games[0].score2}`;
result += `${match.games[1].score1} ${match.games[1].score2}`;
if (match.games[2] != null) {
result += `${match.games[2].score1} - ${match.games[2].score2}`;
}
return result;
}
}

View File

@@ -0,0 +1,11 @@
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: 'status',
standalone: true
})
export class StatusPipe implements PipeTransform {
transform(objectWithStatus: any, args?: any): any {
if (objectWithStatus.status == 'NOT_STARTED') return 'Nog niet gestart';
return "";
}
}

View File

@@ -0,0 +1,19 @@
import { Pipe, PipeTransform } from '@angular/core';
import {FullNamePipe} from "../pipes/fullname-pipe";
@Pipe({
name: 'teamText',
standalone: true
})
export class TeamPipe implements PipeTransform {
constructor(private fullNamePipe: FullNamePipe) {}
transform(team: any, args?: any): any {
if (team.player2 != null) {
// return this.player1.getFullName() + " / " + this.player2.getFullName();
return this.fullNamePipe.transform(team.player1) + " / " + this.fullNamePipe.transform(team.player2);
}
// return this.player1.getFullName();
return this.fullNamePipe.transform(team.player1);
}
}