feat: update device management to include device description and change status display
This commit is contained in:
@@ -53,10 +53,11 @@ const DetailDevice = (props) => {
|
|||||||
device_name: formData.device_name,
|
device_name: formData.device_name,
|
||||||
is_active: formData.is_active,
|
is_active: formData.is_active,
|
||||||
device_location: formData.device_location,
|
device_location: formData.device_location,
|
||||||
|
device_description: formData.device_description,
|
||||||
ip_address: formData.ip_address,
|
ip_address: formData.ip_address,
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = !formData.device_id
|
const response = formData.device_id
|
||||||
? await updateDevice(formData.device_id, payload)
|
? await updateDevice(formData.device_id, payload)
|
||||||
: await createDevice(payload);
|
: await createDevice(payload);
|
||||||
|
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Status',
|
title: 'Status',
|
||||||
dataIndex: 'device_status',
|
dataIndex: 'is_active',
|
||||||
key: 'device_status',
|
key: 'is_active',
|
||||||
width: '10%',
|
width: '10%',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: (_, { device_status }) => (
|
render: (_, { is_active }) => (
|
||||||
<>
|
<>
|
||||||
{device_status === true ? (
|
{is_active === true ? (
|
||||||
<Tag color={'green'} key={'status'}>
|
<Tag color={'green'} key={'status'}>
|
||||||
Running
|
Running
|
||||||
</Tag>
|
</Tag>
|
||||||
|
|||||||
Reference in New Issue
Block a user