do to formatters

This commit is contained in:
2026-01-24 01:07:43 +01:00
parent ae59df61eb
commit 891b3cf0ee
140 changed files with 656 additions and 1159 deletions

View File

@@ -0,0 +1,20 @@
/**
* DriverRegistrationStatusDisplay
*
* Deterministic mapping of driver registration boolean state
* to UI labels and variants.
*/
export class DriverRegistrationStatusFormatter {
static statusMessage(isRegistered: boolean): string {
return isRegistered ? "Registered for this race" : "Not registered";
}
static statusBadgeVariant(isRegistered: boolean): string {
return isRegistered ? "success" : "warning";
}
static registrationButtonText(isRegistered: boolean): string {
return isRegistered ? "Withdraw" : "Register";
}
}