6 lines
362 B
TypeScript
Raw Normal View History

2024-08-22 01:44:50 +02:00
export const rolesToColor = (roles: string[]) => roles.includes('registrant') ? 'green' :
2024-08-23 21:19:34 +02:00
roles.includes('technical') ? 'orange' :
roles.includes('administrative') ? 'blue' :
2024-08-22 01:44:50 +02:00
roles.includes('registrar') ? 'purple' :
roles.includes('sponsor') ? 'magenta' :
roles.includes('billing') ? 'cyan' : 'default'