feat: add orders table tab for logistician role

This commit is contained in:
root 2026-05-27 13:59:21 +00:00
parent 8dcab4da77
commit d43dd04e9b
1 changed files with 15 additions and 3 deletions

View File

@ -92,6 +92,11 @@ export const DashboardPage = () => {
{ key: "orders", label: "Группы", description: "Реестр групп доставки.", badge: String(allOrderGroups.length || orderGroups.length || 0) },
{ key: "users", label: "Пользователи", description: "Управление пользователями.", badge: null },
]
: 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) },
];
@ -118,6 +123,13 @@ export const DashboardPage = () => {
);
}
if (userRole === "logistician") {
if (activeSection === "orders") {
return (
<div className="space-y-6 xl:space-y-8">
<OrdersTable orderGroups={filteredOrderGroups} selectedOrderGroupId={selectedOrderGroupId} onOpenOrder={openGroupPage} filters={filters} setFilters={setFilters} statusOptions={statusOptions} />
</div>
);
}
return (
<div className="space-y-6 xl:space-y-8">
<LogisticsReadinessBoard orderGroups={allOrderGroups} onSelectSet={openGroupPage} statusOptions={statusOptions} />