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