view data fixes
This commit is contained in:
10
apps/website/lib/display-objects/MembershipFeeTypeDisplay.ts
Normal file
10
apps/website/lib/display-objects/MembershipFeeTypeDisplay.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export class MembershipFeeTypeDisplay {
|
||||
static format(type: string): string {
|
||||
switch (type) {
|
||||
case 'season': return 'Per Season';
|
||||
case 'monthly': return 'Monthly';
|
||||
case 'per_race': return 'Per Race';
|
||||
default: return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
5
apps/website/lib/display-objects/PayerTypeDisplay.ts
Normal file
5
apps/website/lib/display-objects/PayerTypeDisplay.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export class PayerTypeDisplay {
|
||||
static format(type: string): string {
|
||||
return type.charAt(0).toUpperCase() + type.slice(1);
|
||||
}
|
||||
}
|
||||
5
apps/website/lib/display-objects/PaymentTypeDisplay.ts
Normal file
5
apps/website/lib/display-objects/PaymentTypeDisplay.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export class PaymentTypeDisplay {
|
||||
static format(type: string): string {
|
||||
return type.replace('_', ' ').replace(/\b\w/g, l => l.toUpperCase());
|
||||
}
|
||||
}
|
||||
10
apps/website/lib/display-objects/PrizeTypeDisplay.ts
Normal file
10
apps/website/lib/display-objects/PrizeTypeDisplay.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export class PrizeTypeDisplay {
|
||||
static format(type: string): string {
|
||||
switch (type) {
|
||||
case 'cash': return 'Cash Prize';
|
||||
case 'merchandise': return 'Merchandise';
|
||||
case 'other': return 'Other';
|
||||
default: return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export class TransactionTypeDisplay {
|
||||
static format(type: string): string {
|
||||
return type.charAt(0).toUpperCase() + type.slice(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user