feat: add orders table tab for logistician role
This commit is contained in:
parent
8dcab4da77
commit
d43dd04e9b
|
|
@ -92,6 +92,11 @@ export const DashboardPage = () => {
|
||||||
{ key: "orders", label: "Группы", description: "Реестр групп доставки.", badge: String(allOrderGroups.length || orderGroups.length || 0) },
|
{ key: "orders", label: "Группы", description: "Реестр групп доставки.", badge: String(allOrderGroups.length || orderGroups.length || 0) },
|
||||||
{ key: "users", label: "Пользователи", description: "Управление пользователями.", badge: null },
|
{ 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) },
|
{ 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 (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 (
|
return (
|
||||||
<div className="space-y-6 xl:space-y-8">
|
<div className="space-y-6 xl:space-y-8">
|
||||||
<LogisticsReadinessBoard orderGroups={allOrderGroups} onSelectSet={openGroupPage} statusOptions={statusOptions} />
|
<LogisticsReadinessBoard orderGroups={allOrderGroups} onSelectSet={openGroupPage} statusOptions={statusOptions} />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue