feat: replace device location select with input field for direct entry in DetailDevice component

This commit is contained in:
2025-10-17 00:45:32 +07:00
parent fcf1deaa26
commit 2bf83619c7

View File

@@ -215,12 +215,6 @@ const DetailDevice = (props) => {
});
};
const handleSelectChange = (value) => {
setFormData({
...FormData,
device_location: value,
});
};
useEffect(() => {
const token = localStorage.getItem('token');
@@ -366,16 +360,13 @@ const DetailDevice = (props) => {
<div style={{ marginBottom: 12 }}>
<Text strong>Device Location</Text>
<Text style={{ color: 'red' }}> *</Text>
<Select
<Input
type="text"
name="device_location"
value={FormData.device_location}
onChange={handleSelectChange}
disabled={props.readOnly}
style={{ width: '100%' }}
placeholder="Select Location"
options={[
{ value: 'Building A', label: 'Building A' },
{ value: 'Building B', label: 'Building B' },
]}
onChange={handleInputChange}
placeholder="Enter Device Location"
readOnly={props.readOnly}
/>
</div>
<div style={{ marginBottom: 12 }}>