2024-12-30 23:50:15 +01:00
|
|
|
import {Avatar} from 'antd'
|
2024-08-22 01:44:50 +02:00
|
|
|
import {
|
|
|
|
|
BankOutlined,
|
|
|
|
|
DollarOutlined,
|
|
|
|
|
IdcardOutlined,
|
|
|
|
|
SignatureOutlined,
|
|
|
|
|
ToolOutlined,
|
|
|
|
|
UserOutlined
|
2024-12-30 23:50:15 +01:00
|
|
|
} from '@ant-design/icons'
|
|
|
|
|
import React from 'react'
|
2024-08-22 01:44:50 +02:00
|
|
|
|
2024-12-30 23:50:15 +01:00
|
|
|
import {rolesToColor} from './rolesToColor'
|
2024-08-22 01:44:50 +02:00
|
|
|
|
2024-12-30 23:50:15 +01:00
|
|
|
export const roleToAvatar = (e: { roles: string[] }) => <Avatar
|
|
|
|
|
style={{backgroundColor: rolesToColor(e.roles)}}
|
|
|
|
|
icon={e.roles.includes('registrant')
|
|
|
|
|
? <SignatureOutlined/>
|
|
|
|
|
: e.roles.includes('registrar')
|
|
|
|
|
? <BankOutlined/>
|
|
|
|
|
: e.roles.includes('administrative')
|
|
|
|
|
? <IdcardOutlined/>
|
|
|
|
|
: e.roles.includes('technical')
|
|
|
|
|
? <ToolOutlined/>
|
|
|
|
|
: e.roles.includes('billing')
|
|
|
|
|
? <DollarOutlined/>
|
|
|
|
|
: <UserOutlined/>}
|
|
|
|
|
/>
|