From 19b4ed534cb6ca5dd153aa77370202a6f0ed5778 Mon Sep 17 00:00:00 2001 From: "kelvin.yau" Date: Tue, 3 Mar 2026 20:32:52 +0800 Subject: [PATCH] dashboards formatting (keep same) --- .../GoodsReceiptStatusNew.tsx | 22 ++++-- .../truckSchedule/TruckScheduleDashboard.tsx | 43 +++++++----- .../FGPickOrderTicketReleaseTable.tsx | 61 +++++++++------- .../Jodetail/MaterialPickStatusTable.tsx | 39 ++++++++--- .../EquipmentStatusDashboard.tsx | 69 ++++++++++++------- .../ProductionProcess/JobProcessStatus.tsx | 32 ++++++--- .../OperatorKpiDashboard.tsx | 32 ++++++--- src/i18n/zh/common.json | 8 ++- src/i18n/zh/dashboard.json | 8 ++- src/i18n/zh/jo.json | 6 ++ src/i18n/zh/ticketReleaseTable.json | 6 ++ 11 files changed, 225 insertions(+), 101 deletions(-) diff --git a/src/components/DashboardPage/goodsReceiptStatus/GoodsReceiptStatusNew.tsx b/src/components/DashboardPage/goodsReceiptStatus/GoodsReceiptStatusNew.tsx index 6b6cdae..f26df6d 100644 --- a/src/components/DashboardPage/goodsReceiptStatus/GoodsReceiptStatusNew.tsx +++ b/src/components/DashboardPage/goodsReceiptStatus/GoodsReceiptStatusNew.tsx @@ -62,6 +62,12 @@ const GoodsReceiptStatusNew: React.FC = () => { return () => clearInterval(refreshInterval); }, [loadData, screenCleared]); + const [now, setNow] = useState(dayjs()); + + useEffect(() => { + const timer = setInterval(() => setNow(dayjs()), 60 * 1000); + return () => clearInterval(timer); + }, []); const selectedDateLabel = useMemo(() => { return selectedDate.format('YYYY-MM-DD'); @@ -187,10 +193,14 @@ const GoodsReceiptStatusNew: React.FC = () => { - - - {t("Auto-refresh every 15 minutes")} | {t("Last updated")}: {lastUpdated ? lastUpdated.format('HH:mm:ss') : '--:--:--'} - + + + {t("Now")}: {now.format('HH:mm')} + + + {t("Auto-refresh every 15 minutes")} | {t("Last updated")}: {lastUpdated ? lastUpdated.format('HH:mm:ss') : '--:--:--'} + +