lavoce #8

Merged
bragaz_rexita merged 5 commits from lavoce into main 2025-10-25 09:19:36 +00:00
5 changed files with 62 additions and 28 deletions
Showing only changes of commit a3e5fdd138 - Show all commits

View File

@@ -53,10 +53,18 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
key: 'is_active', key: 'is_active',
width: '10%', width: '10%',
align: 'center', align: 'center',
render: (status) => ( render: (_, { is_active }) => (
<Tag color={status ? '#23A55A' : 'red'} style={{ fontSize: '12px' }}> <>
{status ? 'Active' : 'Inactive'} {is_active === true ? (
<Tag color={'green'} key={'status'}>
Running
</Tag> </Tag>
) : (
<Tag color={'red'} key={'status'}>
Offline
</Tag>
)}
</>
), ),
}, },
{ {

View File

@@ -56,8 +56,18 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
key: 'is_active', key: 'is_active',
width: '15%', width: '15%',
align: 'center', align: 'center',
render: (status) => ( render: (_, { is_active }) => (
<Tag color={status ? 'green' : 'red'}>{status ? 'Active' : 'Inactive'}</Tag> <>
{is_active === true ? (
<Tag color={'green'} key={'status'}>
Running
</Tag>
) : (
<Tag color={'red'} key={'status'}>
Offline
</Tag>
)}
</>
), ),
}, },
{ {

View File

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

View File

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

View File

@@ -46,9 +46,17 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
width: '10%', width: '10%',
align: 'center', align: 'center',
render: (_, { is_active }) => ( render: (_, { is_active }) => (
<Tag color={is_active ? 'green' : 'red'} key={'status'}> <>
{is_active ? 'Active' : 'Inactive'} {is_active === true ? (
<Tag color={'green'} key={'status'}>
Active
</Tag> </Tag>
) : (
<Tag color={'default'} key={'status'}>
Inactive
</Tag>
)}
</>
), ),
}, },
{ {