From e26435f4f3aa85dd69d1576465cda4953e9b1a29 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi <90936742+Reckless-Satoshi@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:53:04 +0000 Subject: [PATCH] Fix loading robots (#1166) * Fix loading Robot orders * remove logs * feat: move looking for orders loading bar --------- Co-authored-by: KoalaSat --- frontend/src/basic/RobotPage/RobotProfile.tsx | 18 ++++++++++++++++++ frontend/src/models/Coordinator.model.ts | 2 ++ frontend/static/locales/ca.json | 2 ++ frontend/static/locales/cs.json | 2 ++ frontend/static/locales/de.json | 2 ++ frontend/static/locales/en.json | 2 ++ frontend/static/locales/es.json | 2 ++ frontend/static/locales/eu.json | 2 ++ frontend/static/locales/fr.json | 2 ++ frontend/static/locales/it.json | 2 ++ frontend/static/locales/ja.json | 2 ++ frontend/static/locales/pl.json | 2 ++ frontend/static/locales/pt.json | 2 ++ frontend/static/locales/ru.json | 2 ++ frontend/static/locales/sv.json | 2 ++ frontend/static/locales/sw.json | 2 ++ frontend/static/locales/th.json | 2 ++ frontend/static/locales/zh-SI.json | 2 ++ frontend/static/locales/zh-TR.json | 2 ++ 19 files changed, 54 insertions(+) diff --git a/frontend/src/basic/RobotPage/RobotProfile.tsx b/frontend/src/basic/RobotPage/RobotProfile.tsx index 9c0d472e..7060e7a8 100644 --- a/frontend/src/basic/RobotPage/RobotProfile.tsx +++ b/frontend/src/basic/RobotPage/RobotProfile.tsx @@ -75,6 +75,10 @@ const RobotProfile = ({ const slot = garage.getSlot(); const robot = slot?.getRobot(); + const loadingCoordinators = Object.values(slot?.robots ?? {}).filter( + (robot) => robot.loading, + ).length; + return ( + {loadingCoordinators > 0 ? ( + + {t('Looking for orders!')} + + + ) : null} + {Boolean(robot?.activeOrderId) && Boolean(slot?.hashId) ? (