1 line
28 KiB
JSON
1 line
28 KiB
JSON
{"ast":null,"code":"import React,{useState,useEffect}from'react';import{FiX,FiSave}from'react-icons/fi';import{deviceApi}from'../services/api';import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";const EditDeviceModal=_ref=>{let{isOpen,onClose,device,onDeviceUpdated}=_ref;const[loading,setLoading]=useState(false);const[error,setError]=useState('');const[formData,setFormData]=useState({name:'',description:'',model:'SIM7000E',firmware_version:'',is_active:true,latitude:'',longitude:'',altitude:''});useEffect(()=>{if(device){var _device$location,_device$location2,_device$location3;setFormData({name:device.name||'',description:device.description||'',model:device.model||'SIM7000E',firmware_version:device.firmware_version||'',is_active:device.is_active!==undefined?device.is_active:true,latitude:device.latitude||((_device$location=device.location)===null||_device$location===void 0?void 0:_device$location.latitude)||'',longitude:device.longitude||((_device$location2=device.location)===null||_device$location2===void 0?void 0:_device$location2.longitude)||'',altitude:device.altitude||((_device$location3=device.location)===null||_device$location3===void 0?void 0:_device$location3.altitude)||''});}},[device]);const handleChange=e=>{const{name,value,type,checked}=e.target;setFormData(prev=>({...prev,[name]:type==='checkbox'?checked:value}));};const handleSubmit=async e=>{e.preventDefault();if(!device)return;setLoading(true);setError('');try{// Prepare update data - only include fields that have values\nconst updateData={};if(formData.name.trim())updateData.name=formData.name.trim();if(formData.description.trim())updateData.description=formData.description.trim();if(formData.model)updateData.model=formData.model;if(formData.firmware_version.trim())updateData.firmware_version=formData.firmware_version.trim();updateData.is_active=formData.is_active;// Add coordinates if provided\nif(formData.latitude&&!isNaN(parseFloat(formData.latitude))){updateData.latitude=parseFloat(formData.latitude);}if(formData.longitude&&!isNaN(parseFloat(formData.longitude))){updateData.longitude=parseFloat(formData.longitude);}if(formData.altitude&&!isNaN(parseFloat(formData.altitude))){updateData.altitude=parseFloat(formData.altitude);}const response=await deviceApi.updateDevice(device.id,updateData);if(onDeviceUpdated){onDeviceUpdated(response.data);}onClose();}catch(error){var _error$response,_error$response$data;console.error('Error updating device:',error);setError(((_error$response=error.response)===null||_error$response===void 0?void 0:(_error$response$data=_error$response.data)===null||_error$response$data===void 0?void 0:_error$response$data.detail)||'Failed to update device');}finally{setLoading(false);}};if(!isOpen)return null;return/*#__PURE__*/_jsx(\"div\",{className:\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"bg-white rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[90vh] overflow-y-auto\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"flex items-center justify-between p-6 border-b border-gray-200\",children:[/*#__PURE__*/_jsx(\"h2\",{className:\"text-xl font-semibold text-gray-800\",children:\"Edit Device\"}),/*#__PURE__*/_jsx(\"button\",{onClick:onClose,className:\"p-2 text-gray-400 hover:text-gray-600 transition-colors\",children:/*#__PURE__*/_jsx(FiX,{className:\"w-5 h-5\"})})]}),/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,className:\"p-6\",children:[error&&/*#__PURE__*/_jsx(\"div\",{className:\"mb-4 p-3 bg-red-50 border border-red-200 rounded-md\",children:/*#__PURE__*/_jsx(\"p\",{className:\"text-red-600 text-sm\",children:error})}),/*#__PURE__*/_jsxs(\"div\",{className:\"space-y-4\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"grid grid-cols-1 md:grid-cols-2 gap-4\",children:[/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"name\",className:\"block text-sm font-medium text-gray-700 mb-1\",children:\"Device Name *\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",id:\"name\",name:\"name\",required:true,value:formData.name,onChange:handleChange,className:\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\",placeholder:\"Enter device name\"})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"model\",className:\"block text-sm font-medium text-gray-700 mb-1\",children:\"Model\"}),/*#__PURE__*/_jsxs(\"select\",{id:\"model\",name:\"model\",value:formData.model,onChange:handleChange,className:\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\",children:[/*#__PURE__*/_jsx(\"option\",{value:\"SIM7000E\",children:\"SIM7000E\"}),/*#__PURE__*/_jsx(\"option\",{value:\"SIM7000A\",children:\"SIM7000A\"}),/*#__PURE__*/_jsx(\"option\",{value:\"SIM7000G\",children:\"SIM7000G\"}),/*#__PURE__*/_jsx(\"option\",{value:\"LILYGO T-A7670G\",children:\"LILYGO T-A7670G\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Custom\",children:\"Custom\"})]})]})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"description\",className:\"block text-sm font-medium text-gray-700 mb-1\",children:\"Description\"}),/*#__PURE__*/_jsx(\"textarea\",{id:\"description\",name:\"description\",rows:\"3\",value:formData.description,onChange:handleChange,className:\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\",placeholder:\"Enter device description\"})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"firmware_version\",className:\"block text-sm font-medium text-gray-700 mb-1\",children:\"Firmware Version\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",id:\"firmware_version\",name:\"firmware_version\",value:formData.firmware_version,onChange:handleChange,className:\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\",placeholder:\"e.g., 1.2.3\"})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{className:\"block text-sm font-medium text-gray-700 mb-2\",children:\"Location (Optional)\"}),/*#__PURE__*/_jsxs(\"div\",{className:\"grid grid-cols-1 md:grid-cols-3 gap-4\",children:[/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"latitude\",className:\"block text-xs font-medium text-gray-500 mb-1\",children:\"Latitude\"}),/*#__PURE__*/_jsx(\"input\",{type:\"number\",id:\"latitude\",name:\"latitude\",step:\"any\",value:formData.latitude,onChange:handleChange,className:\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\",placeholder:\"47.3769\"})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"longitude\",className:\"block text-xs font-medium text-gray-500 mb-1\",children:\"Longitude\"}),/*#__PURE__*/_jsx(\"input\",{type:\"number\",id:\"longitude\",name:\"longitude\",step:\"any\",value:formData.longitude,onChange:handleChange,className:\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\",placeholder:\"8.5417\"})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"altitude\",className:\"block text-xs font-medium text-gray-500 mb-1\",children:\"Altitude (m)\"}),/*#__PURE__*/_jsx(\"input\",{type:\"number\",id:\"altitude\",name:\"altitude\",step:\"any\",value:formData.altitude,onChange:handleChange,className:\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\",placeholder:\"408\"})]})]})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{className:\"block text-sm font-medium text-gray-700 mb-2\",children:\"Status\"}),/*#__PURE__*/_jsxs(\"div\",{className:\"flex items-center\",children:[/*#__PURE__*/_jsx(\"input\",{type:\"checkbox\",id:\"is_active\",name:\"is_active\",checked:formData.is_active,onChange:handleChange,className:\"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded\"}),/*#__PURE__*/_jsx(\"label\",{htmlFor:\"is_active\",className:\"ml-2 block text-sm text-gray-700\",children:\"Device is active\"})]})]})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"flex justify-end gap-3 mt-6 pt-6 border-t border-gray-200\",children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:onClose,className:\"px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors\",children:\"Cancel\"}),/*#__PURE__*/_jsxs(\"button\",{type:\"submit\",disabled:loading,className:`flex items-center gap-2 px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-medium hover:bg-primary-600 transition-colors ${loading?'opacity-50 cursor-not-allowed':''}`,children:[/*#__PURE__*/_jsx(FiSave,{className:\"w-4 h-4\"}),loading?'Updating...':'Update Device']})]})]})]})});};export default EditDeviceModal;","map":{"version":3,"names":["React","useState","useEffect","FiX","FiSave","deviceApi","jsx","_jsx","jsxs","_jsxs","EditDeviceModal","_ref","isOpen","onClose","device","onDeviceUpdated","loading","setLoading","error","setError","formData","setFormData","name","description","model","firmware_version","is_active","latitude","longitude","altitude","_device$location","_device$location2","_device$location3","undefined","location","handleChange","e","value","type","checked","target","prev","handleSubmit","preventDefault","updateData","trim","isNaN","parseFloat","response","updateDevice","id","data","_error$response","_error$response$data","console","detail","className","children","onClick","onSubmit","htmlFor","required","onChange","placeholder","rows","step","disabled"],"sources":["/home/m3mo/Desktop/temparea/solarbank/frontend/src/components/EditDeviceModal.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { FiX, FiSave } from 'react-icons/fi';\nimport { deviceApi } from '../services/api';\n\nconst EditDeviceModal = ({ isOpen, onClose, device, onDeviceUpdated }) => {\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState('');\n const [formData, setFormData] = useState({\n name: '',\n description: '',\n model: 'SIM7000E',\n firmware_version: '',\n is_active: true,\n latitude: '',\n longitude: '',\n altitude: ''\n });\n\n useEffect(() => {\n if (device) {\n setFormData({\n name: device.name || '',\n description: device.description || '',\n model: device.model || 'SIM7000E',\n firmware_version: device.firmware_version || '',\n is_active: device.is_active !== undefined ? device.is_active : true,\n latitude: device.latitude || device.location?.latitude || '',\n longitude: device.longitude || device.location?.longitude || '',\n altitude: device.altitude || device.location?.altitude || ''\n });\n }\n }, [device]);\n\n const handleChange = (e) => {\n const { name, value, type, checked } = e.target;\n setFormData(prev => ({\n ...prev,\n [name]: type === 'checkbox' ? checked : value\n }));\n };\n\n const handleSubmit = async (e) => {\n e.preventDefault();\n if (!device) return;\n\n setLoading(true);\n setError('');\n\n try {\n // Prepare update data - only include fields that have values\n const updateData = {};\n \n if (formData.name.trim()) updateData.name = formData.name.trim();\n if (formData.description.trim()) updateData.description = formData.description.trim();\n if (formData.model) updateData.model = formData.model;\n if (formData.firmware_version.trim()) updateData.firmware_version = formData.firmware_version.trim();\n updateData.is_active = formData.is_active;\n \n // Add coordinates if provided\n if (formData.latitude && !isNaN(parseFloat(formData.latitude))) {\n updateData.latitude = parseFloat(formData.latitude);\n }\n if (formData.longitude && !isNaN(parseFloat(formData.longitude))) {\n updateData.longitude = parseFloat(formData.longitude);\n }\n if (formData.altitude && !isNaN(parseFloat(formData.altitude))) {\n updateData.altitude = parseFloat(formData.altitude);\n }\n\n const response = await deviceApi.updateDevice(device.id, updateData);\n \n if (onDeviceUpdated) {\n onDeviceUpdated(response.data);\n }\n \n onClose();\n } catch (error) {\n console.error('Error updating device:', error);\n setError(error.response?.data?.detail || 'Failed to update device');\n } finally {\n setLoading(false);\n }\n };\n\n if (!isOpen) return null;\n\n return (\n <div className=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\">\n <div className=\"bg-white rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[90vh] overflow-y-auto\">\n <div className=\"flex items-center justify-between p-6 border-b border-gray-200\">\n <h2 className=\"text-xl font-semibold text-gray-800\">Edit Device</h2>\n <button\n onClick={onClose}\n className=\"p-2 text-gray-400 hover:text-gray-600 transition-colors\"\n >\n <FiX className=\"w-5 h-5\" />\n </button>\n </div>\n\n <form onSubmit={handleSubmit} className=\"p-6\">\n {error && (\n <div className=\"mb-4 p-3 bg-red-50 border border-red-200 rounded-md\">\n <p className=\"text-red-600 text-sm\">{error}</p>\n </div>\n )}\n\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <div>\n <label htmlFor=\"name\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Device Name *\n </label>\n <input\n type=\"text\"\n id=\"name\"\n name=\"name\"\n required\n value={formData.name}\n onChange={handleChange}\n className=\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\"\n placeholder=\"Enter device name\"\n />\n </div>\n \n <div>\n <label htmlFor=\"model\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Model\n </label>\n <select\n id=\"model\"\n name=\"model\"\n value={formData.model}\n onChange={handleChange}\n className=\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\"\n >\n <option value=\"SIM7000E\">SIM7000E</option>\n <option value=\"SIM7000A\">SIM7000A</option>\n <option value=\"SIM7000G\">SIM7000G</option>\n <option value=\"LILYGO T-A7670G\">LILYGO T-A7670G</option>\n <option value=\"Custom\">Custom</option>\n </select>\n </div>\n </div>\n\n <div>\n <label htmlFor=\"description\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Description\n </label>\n <textarea\n id=\"description\"\n name=\"description\"\n rows=\"3\"\n value={formData.description}\n onChange={handleChange}\n className=\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\"\n placeholder=\"Enter device description\"\n />\n </div>\n\n <div>\n <label htmlFor=\"firmware_version\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Firmware Version\n </label>\n <input\n type=\"text\"\n id=\"firmware_version\"\n name=\"firmware_version\"\n value={formData.firmware_version}\n onChange={handleChange}\n className=\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\"\n placeholder=\"e.g., 1.2.3\"\n />\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-gray-700 mb-2\">\n Location (Optional)\n </label>\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-4\">\n <div>\n <label htmlFor=\"latitude\" className=\"block text-xs font-medium text-gray-500 mb-1\">\n Latitude\n </label>\n <input\n type=\"number\"\n id=\"latitude\"\n name=\"latitude\"\n step=\"any\"\n value={formData.latitude}\n onChange={handleChange}\n className=\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\"\n placeholder=\"47.3769\"\n />\n </div>\n <div>\n <label htmlFor=\"longitude\" className=\"block text-xs font-medium text-gray-500 mb-1\">\n Longitude\n </label>\n <input\n type=\"number\"\n id=\"longitude\"\n name=\"longitude\"\n step=\"any\"\n value={formData.longitude}\n onChange={handleChange}\n className=\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\"\n placeholder=\"8.5417\"\n />\n </div>\n <div>\n <label htmlFor=\"altitude\" className=\"block text-xs font-medium text-gray-500 mb-1\">\n Altitude (m)\n </label>\n <input\n type=\"number\"\n id=\"altitude\"\n name=\"altitude\"\n step=\"any\"\n value={formData.altitude}\n onChange={handleChange}\n className=\"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm\"\n placeholder=\"408\"\n />\n </div>\n </div>\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-gray-700 mb-2\">\n Status\n </label>\n <div className=\"flex items-center\">\n <input\n type=\"checkbox\"\n id=\"is_active\"\n name=\"is_active\"\n checked={formData.is_active}\n onChange={handleChange}\n className=\"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded\"\n />\n <label htmlFor=\"is_active\" className=\"ml-2 block text-sm text-gray-700\">\n Device is active\n </label>\n </div>\n </div>\n </div>\n\n <div className=\"flex justify-end gap-3 mt-6 pt-6 border-t border-gray-200\">\n <button\n type=\"button\"\n onClick={onClose}\n className=\"px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={loading}\n className={`flex items-center gap-2 px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-medium hover:bg-primary-600 transition-colors ${\n loading ? 'opacity-50 cursor-not-allowed' : ''\n }`}\n >\n <FiSave className=\"w-4 h-4\" />\n {loading ? 'Updating...' : 'Update Device'}\n </button>\n </div>\n </form>\n </div>\n </div>\n );\n};\n\nexport default EditDeviceModal; "],"mappings":"AAAA,MAAO,CAAAA,KAAK,EAAIC,QAAQ,CAAEC,SAAS,KAAQ,OAAO,CAClD,OAASC,GAAG,CAAEC,MAAM,KAAQ,gBAAgB,CAC5C,OAASC,SAAS,KAAQ,iBAAiB,CAAC,OAAAC,GAAA,IAAAC,IAAA,CAAAC,IAAA,IAAAC,KAAA,yBAE5C,KAAM,CAAAC,eAAe,CAAGC,IAAA,EAAkD,IAAjD,CAAEC,MAAM,CAAEC,OAAO,CAAEC,MAAM,CAAEC,eAAgB,CAAC,CAAAJ,IAAA,CACnE,KAAM,CAACK,OAAO,CAAEC,UAAU,CAAC,CAAGhB,QAAQ,CAAC,KAAK,CAAC,CAC7C,KAAM,CAACiB,KAAK,CAAEC,QAAQ,CAAC,CAAGlB,QAAQ,CAAC,EAAE,CAAC,CACtC,KAAM,CAACmB,QAAQ,CAAEC,WAAW,CAAC,CAAGpB,QAAQ,CAAC,CACvCqB,IAAI,CAAE,EAAE,CACRC,WAAW,CAAE,EAAE,CACfC,KAAK,CAAE,UAAU,CACjBC,gBAAgB,CAAE,EAAE,CACp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