balibabu
commited on
Commit
·
a60dcfe
1
Parent(s):
2a1d7bf
Feat: Capitalize the first letter of the team's role #2834 (#3597)
Browse files### What problem does this PR solve?
Feat: Capitalize the first letter of the team's role #2834
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
web/src/pages/user-setting/setting-team/user-table.tsx
CHANGED
@@ -4,6 +4,7 @@ import { formatDate } from '@/utils/date';
|
|
4 |
import { DeleteOutlined } from '@ant-design/icons';
|
5 |
import type { TableProps } from 'antd';
|
6 |
import { Button, Table, Tag } from 'antd';
|
|
|
7 |
import { useTranslation } from 'react-i18next';
|
8 |
import { TenantRole } from '../constants';
|
9 |
import { useHandleDeleteUser } from './hooks';
|
@@ -36,7 +37,9 @@ const UserTable = () => {
|
|
36 |
key: 'role',
|
37 |
render(value, { role }) {
|
38 |
return (
|
39 |
-
<Tag color={ColorMap[role as keyof typeof ColorMap]}>
|
|
|
|
|
40 |
);
|
41 |
},
|
42 |
},
|
|
|
4 |
import { DeleteOutlined } from '@ant-design/icons';
|
5 |
import type { TableProps } from 'antd';
|
6 |
import { Button, Table, Tag } from 'antd';
|
7 |
+
import { upperFirst } from 'lodash';
|
8 |
import { useTranslation } from 'react-i18next';
|
9 |
import { TenantRole } from '../constants';
|
10 |
import { useHandleDeleteUser } from './hooks';
|
|
|
37 |
key: 'role',
|
38 |
render(value, { role }) {
|
39 |
return (
|
40 |
+
<Tag color={ColorMap[role as keyof typeof ColorMap]}>
|
41 |
+
{upperFirst(role)}
|
42 |
+
</Tag>
|
43 |
);
|
44 |
},
|
45 |
},
|