fix(frontend): block access to cwmp or offline device

This commit is contained in:
leandrofars 2024-04-24 15:10:03 -03:00
parent 5df75815b5
commit b258c1ada0

View File

@ -97,15 +97,13 @@ export const OverviewLatestOrders = (props) => {
</SeverityPill> </SeverityPill>
</TableCell> </TableCell>
<TableCell> <TableCell>
{ order.Status == 2 && (order.Mqtt == 0 && order.Websockets == 0 && order.Stomp == 0) ? <span></span>: <SvgIcon { order.Mqtt == 0 && order.Websockets == 0 && order.Stomp == 0 ? <span></span>: <SvgIcon
fontSize="small" fontSize="small"
sx={{cursor: order.Status == 2 && 'pointer'}} sx={{cursor: order.Status == 2 && 'pointer'}}
onClick={()=>{ onClick={()=>{
if (order.Status == 2){
router.push("devices/"+order.SN+"/discovery") router.push("devices/"+order.SN+"/discovery")
} }
} }
}
> >
<ArrowTopRightOnSquareIcon /> <ArrowTopRightOnSquareIcon />
</SvgIcon>} </SvgIcon>}