diff --git a/frontend/src/sections/overview/overview-latest-orders.js b/frontend/src/sections/overview/overview-latest-orders.js index f42fc6b..d5bfc23 100644 --- a/frontend/src/sections/overview/overview-latest-orders.js +++ b/frontend/src/sections/overview/overview-latest-orders.js @@ -21,11 +21,23 @@ import { SeverityPill } from 'src/components/severity-pill'; import { useRouter } from 'next/router'; const statusMap = { - Associating: 'warning', - Online: 'success', - Offline: 'error' + 1: 'warning', + 0: 'success', + 2: 'error' }; +const status = (s)=>{ + if (s == 0){ + return "Online" + } else if (s == 1){ + return "Associating" + }else if (s==2){ + return "Offline" + }else { + return "Unknown" + } +} + export const OverviewLatestOrders = (props) => { const { orders = [], sx } = props; @@ -39,23 +51,23 @@ export const OverviewLatestOrders = (props) => { - - SN + + Serial Number - MODEL - - - CUSTOMER + Model - VENDOR + Vendor - VERSION + Version - STATUS + Status + + + Access @@ -67,15 +79,12 @@ export const OverviewLatestOrders = (props) => { hover key={order.SN} > - + {order.SN} {order.Model} - - {order.Customer} - {order.Vendor} @@ -83,7 +92,18 @@ export const OverviewLatestOrders = (props) => { {order.Version} - {order.Status} + + {status(order.Status)} + + + + router.push("devices/"+order.id)} + > + + );