From 0b85b4aca07f223031154220513875ccca71c353 Mon Sep 17 00:00:00 2001 From: leandrofars Date: Sat, 17 Feb 2024 13:50:12 -0300 Subject: [PATCH] fix(frontend): status message iota order change --- .../src/sections/overview/overview-latest-orders.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/sections/overview/overview-latest-orders.js b/frontend/src/sections/overview/overview-latest-orders.js index b60d54a..7d4369f 100644 --- a/frontend/src/sections/overview/overview-latest-orders.js +++ b/frontend/src/sections/overview/overview-latest-orders.js @@ -22,17 +22,17 @@ import { useRouter } from 'next/router'; const statusMap = { 1: 'warning', - 0: 'success', - 2: 'error' + 2: 'success', + 0: 'error' }; const status = (s)=>{ if (s == 0){ - return "Online" + return "Offline" } else if (s == 1){ return "Associating" }else if (s==2){ - return "Offline" + return "Online" }else { return "Unknown" } @@ -99,9 +99,9 @@ export const OverviewLatestOrders = (props) => { { - if (order.Status !== 2){ + if (order.Status == 2){ router.push("devices/"+order.SN+"/discovery") } }