From d43dd04e9b6402e1a28456a3057390661667180a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 27 May 2026 13:59:21 +0000 Subject: [PATCH] feat: add orders table tab for logistician role --- src/pages/DashboardPage.jsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/pages/DashboardPage.jsx b/src/pages/DashboardPage.jsx index 8a12f39..ab4d399 100644 --- a/src/pages/DashboardPage.jsx +++ b/src/pages/DashboardPage.jsx @@ -92,9 +92,14 @@ export const DashboardPage = () => { { key: "orders", label: "Группы", description: "Реестр групп доставки.", badge: String(allOrderGroups.length || orderGroups.length || 0) }, { key: "users", label: "Пользователи", description: "Управление пользователями.", badge: null }, ] - : [ - { key: section.key, label: section.label, description: section.description, badge: String(allOrderGroups.length || orderGroups.length || 0) }, - ]; + : userRole === "logistician" + ? [ + { key: "logistics", label: "Логистика", description: "Группы доставки по готовности к уведомлению.", badge: String(allOrderGroups.length || orderGroups.length || 0) }, + { key: "orders", label: "Группы", description: "Реестр групп доставки.", badge: null }, + ] + : [ + { key: section.key, label: section.label, description: section.description, badge: String(allOrderGroups.length || orderGroups.length || 0) }, + ]; const guideSectionMeta = { key: "guide", label: "Справка", description: "Карта продукта, роли, сценарии и частые вопросы." }; const activeSectionMeta = activeSection === "guide" ? guideSectionMeta : navItems.find((n) => n.key === activeSection) || navItems[0]; @@ -118,6 +123,13 @@ export const DashboardPage = () => { ); } if (userRole === "logistician") { + if (activeSection === "orders") { + return ( +
+ +
+ ); + } return (