refactor: update is_active rendering to use 'Running' and 'Offline' labels

This commit is contained in:
2025-10-24 19:51:34 +07:00
parent 2abed31bde
commit a3e5fdd138
5 changed files with 62 additions and 28 deletions

View File

@@ -45,15 +45,19 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
key: 'is_active',
width: '10%',
align: 'center',
render: (_, { is_active }) => {
const color = is_active ? 'green' : 'red';
const text = is_active ? 'Active' : 'Inactive';
return (
<Tag color={color} key={'status'}>
{text}
</Tag>
);
},
render: (_, { is_active }) => (
<>
{is_active === true ? (
<Tag color={'green'} key={'status'}>
Running
</Tag>
) : (
<Tag color={'red'} key={'status'}>
Offline
</Tag>
)}
</>
),
},
{
title: 'Aksi',