fix(frontend): status message iota order change
This commit is contained in:
parent
2c06cdf91a
commit
0b85b4aca0
|
|
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user