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,
|
||||
is_active: formData.is_active,
|
||||
device_location: formData.device_location,
|
||||
device_description: formData.device_description,
|
||||
ip_address: formData.ip_address,
|
||||
};
|
||||
|
||||
const response = !formData.device_id
|
||||
const response = formData.device_id
|
||||
? await updateDevice(formData.device_id, payload)
|
||||
: await createDevice(payload);
|
||||
|
||||
|
||||
@@ -48,13 +48,13 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
|
||||
},
|
||||
{
|
||||
title: 'Status',
|
||||
dataIndex: 'device_status',
|
||||
key: 'device_status',
|
||||
dataIndex: 'is_active',
|
||||
key: 'is_active',
|
||||
width: '10%',
|
||||
align: 'center',
|
||||
render: (_, { device_status }) => (
|
||||
render: (_, { is_active }) => (
|
||||
<>
|
||||
{device_status === true ? (
|
||||
{is_active === true ? (
|
||||
<Tag color={'green'} key={'status'}>
|
||||
Running
|
||||
</Tag>
|
||||
|
||||
Reference in New Issue
Block a user