do to formatters
This commit is contained in:
19
apps/website/lib/formatters/UserRoleFormatter.ts
Normal file
19
apps/website/lib/formatters/UserRoleFormatter.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* UserRoleDisplay
|
||||
*
|
||||
* Deterministic mapping of user role codes to display labels.
|
||||
*/
|
||||
|
||||
export class UserRoleFormatter {
|
||||
/**
|
||||
* Maps user role to display label.
|
||||
*/
|
||||
static roleLabel(role: string): string {
|
||||
const map: Record<string, string> = {
|
||||
owner: 'Owner',
|
||||
admin: 'Admin',
|
||||
user: 'User',
|
||||
};
|
||||
return map[role] || role;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user