Bổ sung view badge cho nội dung level

This commit is contained in:
Truong Vo 2024-09-21 10:46:03 +07:00
parent 67516faa3d
commit 9d0dd9bbab
1 changed files with 18 additions and 11 deletions

View File

@ -198,17 +198,24 @@ const StaffEvaluation = () => {
size: '10%',
header: 'Level',
render: (row: any) => {
if (row.level)
return (
<div
style={{
display: 'flex',
justifyContent: 'center',
}}
>
{row?.level}
</div>
)
return (
<Box
style={
row?.level
? row?.level === 1
? { backgroundColor: '#d9d2e9' }
: row?.level === 2
? { backgroundColor: '#ffd966' }
: { backgroundColor: '#cfe2f3' }
: { backgroundColor: '' }
}
fw={500}
ta="center"
p={4}
>
{row?.level ? row.level : ''}
</Box>
)
},
},
{