From 17c7ae63c8f149bef3583f4a8910b52595867ce2 Mon Sep 17 00:00:00 2001 From: Behrad Date: Wed, 16 Sep 2026 16:17:57 +0330 Subject: [PATCH] fix(ui): improve mobile tabbar sizing, inventory actions, date picker proportions and stats lead time --- frontend/src/components/StatsBar.tsx | 19 +++++++---- .../src/components/layout/MobileTabBar.tsx | 12 +++---- .../src/pages/Inventory/InventoryPage.tsx | 33 ++++++++++--------- frontend/src/pages/Wizard/Step5Review.tsx | 17 ++++++---- 4 files changed, 47 insertions(+), 34 deletions(-) diff --git a/frontend/src/components/StatsBar.tsx b/frontend/src/components/StatsBar.tsx index a7a8cb4..44a1029 100644 --- a/frontend/src/components/StatsBar.tsx +++ b/frontend/src/components/StatsBar.tsx @@ -13,6 +13,7 @@ export function StatsBar({ total, offered, accepted, avgLeadTime }: StatsBarProp label: string; shortLabel: string; value: string; + unit?: string; color: string; icon: LucideIcon; }[] = [ @@ -38,9 +39,10 @@ export function StatsBar({ total, offered, accepted, avgLeadTime }: StatsBarProp icon: CheckCircle2, }, { - label: "میانگین lead time (روز)", - shortLabel: "زمان تحویل", + label: "میانگین زمان تحویل", + shortLabel: "میانگین تحویل", value: avgLeadTime == null ? "—" : fmtNum(avgLeadTime), + unit: avgLeadTime != null ? "روز" : undefined, color: "text-green", icon: Timer, }, @@ -60,17 +62,22 @@ export function StatsBar({ total, offered, accepted, avgLeadTime }: StatsBarProp {s.label} - {/* آیکون در موبایل حذف شده تا فضا برای متن باز بماند */} + {/* آیکون در دسکتاپ */} - {/* مقدار عددی */} + {/* مقدار عددی به همراه واحد روز */}
- {s.value} + {s.value} + {s.unit && ( + + {s.unit} + + )}
))} diff --git a/frontend/src/components/layout/MobileTabBar.tsx b/frontend/src/components/layout/MobileTabBar.tsx index b5fcecf..453d558 100644 --- a/frontend/src/components/layout/MobileTabBar.tsx +++ b/frontend/src/components/layout/MobileTabBar.tsx @@ -48,7 +48,7 @@ const ADMIN_INV_TABS: TabDef[] = [ function TabBar({ tabs }: { tabs: TabDef[] }) { return (