fix: update device filtering logic and improve UI labels in DetailTag component

This commit is contained in:
2025-10-16 15:07:25 +07:00
parent 9f46908d79
commit 1ba83ec105

View File

@@ -243,8 +243,8 @@ const DetailTag = (props) => {
if (response && response.data && response.data.data) {
const devices = response.data.data;
// Filter hanya device yang active (device_status === true)
const activeDevices = devices.filter((device) => device.device_status === true);
// Filter hanya device yang active (is_active === true)
const activeDevices = devices.filter((device) => device.is_active === true);
setDeviceList(activeDevices);
}
@@ -508,7 +508,7 @@ const DetailTag = (props) => {
/>
</div>
<div style={{ marginBottom: 12 }}>
<Text strong>Plant Sub Section Name</Text>
<Text strong>Plant Sub Section</Text>
<Select
style={{ width: '100%' }}
placeholder="Select Plant Sub Section"
@@ -540,7 +540,7 @@ const DetailTag = (props) => {
<Text style={{ color: 'red' }}> *</Text>
<Select
style={{ width: '100%' }}
placeholder="Search device code or name"
placeholder="Select Device"
value={FormData.device_id || undefined}
onChange={handleDeviceChange}
disabled={props.readOnly}