Merge pull request 'Bổ sung view badge cho nội dung level' (#73) from Sprint-4/MS-37-FE-Evaluation into master

Reviewed-on: #73
This commit is contained in:
vincent.vo 2024-09-21 13:46:35 +10:00
commit a7f75c686b
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>
)
},
},
{