From 59519cb182a1ec4c7daeb52a4a3515a2dd826ad8 Mon Sep 17 00:00:00 2001 From: Michel ten Voorde Date: Sun, 29 Nov 2026 23:45:35 +0100 Subject: [PATCH] Added default value for full name pipe --- .../tournament-registrations.component.html | 2 +- src/app/pipes/fullname-pipe.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/tournament-registrations/tournament-registrations.component.html b/src/app/components/tournament-registrations/tournament-registrations.component.html index e9e38eb..c50836e 100644 --- a/src/app/components/tournament-registrations/tournament-registrations.component.html +++ b/src/app/components/tournament-registrations/tournament-registrations.component.html @@ -28,7 +28,7 @@ {{ registration.player.club }} @if (event.doublesEvent) { {{ registration.partner?.club }} - {{ registration.partner | fullName }} + {{ registration.partner | fullName: '' }} } } diff --git a/src/app/pipes/fullname-pipe.ts b/src/app/pipes/fullname-pipe.ts index a53dfd7..b5279b2 100644 --- a/src/app/pipes/fullname-pipe.ts +++ b/src/app/pipes/fullname-pipe.ts @@ -4,11 +4,11 @@ import { Pipe, PipeTransform } from '@angular/core'; standalone: true }) export class FullNamePipe implements PipeTransform { - transform(person: any, args?: any): any { + transform(person: any, defaultValue: string = 'Invalteller'): any { if (person) { return [person.firstName, person.middleName, person.lastName].filter(Boolean).join(" "); } else { - return "Invalteller"; + return defaultValue; } } }