fix(frontend): status message iota order change

This commit is contained in:
leandrofars 2024-02-17 13:50:12 -03:00
parent 2c06cdf91a
commit 0b85b4aca0

View File

@ -22,17 +22,17 @@ import { useRouter } from 'next/router';
const statusMap = { const statusMap = {
1: 'warning', 1: 'warning',
0: 'success', 2: 'success',
2: 'error' 0: 'error'
}; };
const status = (s)=>{ const status = (s)=>{
if (s == 0){ if (s == 0){
return "Online" return "Offline"
} else if (s == 1){ } else if (s == 1){
return "Associating" return "Associating"
}else if (s==2){ }else if (s==2){
return "Offline" return "Online"
}else { }else {
return "Unknown" return "Unknown"
} }
@ -99,9 +99,9 @@ export const OverviewLatestOrders = (props) => {
<TableCell> <TableCell>
<SvgIcon <SvgIcon
fontSize="small" fontSize="small"
sx={{cursor: order.Status !== 2 && 'pointer'}} sx={{cursor: order.Status == 2 && 'pointer'}}
onClick={()=>{ onClick={()=>{
if (order.Status !== 2){ if (order.Status == 2){
router.push("devices/"+order.SN+"/discovery") router.push("devices/"+order.SN+"/discovery")
} }
} }