diff --git a/frontend/src/sections/devices/cwmp/devices-wifi.js b/frontend/src/sections/devices/cwmp/devices-wifi.js index 9e07c92..bd10cec 100644 --- a/frontend/src/sections/devices/cwmp/devices-wifi.js +++ b/frontend/src/sections/devices/cwmp/devices-wifi.js @@ -108,7 +108,8 @@ export const DevicesWiFi = () => { { item.enable.value != null && { - let enable = e.target.value == 1 ? "1" : "0" + let enable = item.enable.value == 1 ? "0" : "1" + console.log(enable) applyContent[index].hasChanges = true applyContent[index].enable = { value : enable @@ -145,12 +146,17 @@ export const DevicesWiFi = () => { disabled={!item.password.writable} value={item.password.value} onChange={(e) => { - applyContent[index].hasChanges = true + if (e.target.value.length >= 8) { + applyContent[index].hasChanges = true + }else{ + applyContent[index].hasChanges = false + } applyContent[index].password = { value : e.target.value } setApplyContent([...applyContent]) item.password.value = e.target.value + console.log("applyContent: ", applyContent) }} />} {item.standard.value != null && @@ -226,107 +232,6 @@ export const DevicesWiFi = () => { })): } - {/* - - - - } - /> - - - } label="Enabled" /> - - - - - - - - - - - } - /> - - - } label="Enabled" /> - - Security - - - - - - - - - */} - {/* setErrorToApplyContent(false)} - autoHideDuration={1200} - > - - - - -
- - No changes to apply - - - } - /> -
*/} theme.zIndex.drawer + 1 }}