Добавлены модели и функциональность для управления логистикой, включая создание, обновление и удаление логистических маршрутов через GraphQL. Обновлены компоненты для отображения и управления логистикой, улучшен интерфейс взаимодействия с пользователем. Реализованы новые типы данных и интерфейсы для логистики, а также улучшена обработка ошибок.
This commit is contained in:
@ -12,7 +12,8 @@ import {
|
||||
MessageCircle,
|
||||
Wrench,
|
||||
Warehouse,
|
||||
Users
|
||||
Users,
|
||||
Truck
|
||||
} from 'lucide-react'
|
||||
|
||||
export function Sidebar() {
|
||||
@ -76,12 +77,17 @@ export function Sidebar() {
|
||||
router.push('/employees')
|
||||
}
|
||||
|
||||
const handleSuppliesClick = () => {
|
||||
router.push('/supplies')
|
||||
}
|
||||
|
||||
const isSettingsActive = pathname === '/settings'
|
||||
const isMarketActive = pathname.startsWith('/market')
|
||||
const isMessengerActive = pathname.startsWith('/messenger')
|
||||
const isServicesActive = pathname.startsWith('/services')
|
||||
const isWarehouseActive = pathname.startsWith('/warehouse')
|
||||
const isEmployeesActive = pathname.startsWith('/employees')
|
||||
const isSuppliesActive = pathname.startsWith('/supplies')
|
||||
|
||||
return (
|
||||
<div className="fixed left-0 top-0 h-full w-56 bg-white/10 backdrop-blur-xl border-r border-white/20 p-3">
|
||||
@ -180,6 +186,22 @@ export function Sidebar() {
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{/* Поставки - только для селлеров */}
|
||||
{user?.organization?.type === 'SELLER' && (
|
||||
<Button
|
||||
variant={isSuppliesActive ? "secondary" : "ghost"}
|
||||
className={`w-full justify-start text-left transition-all duration-200 h-8 text-xs ${
|
||||
isSuppliesActive
|
||||
? 'bg-white/20 text-white hover:bg-white/30'
|
||||
: 'text-white/80 hover:bg-white/10 hover:text-white'
|
||||
} cursor-pointer`}
|
||||
onClick={handleSuppliesClick}
|
||||
>
|
||||
<Truck className="h-3 w-3 mr-2" />
|
||||
Поставки
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{/* Склад - только для оптовиков */}
|
||||
{user?.organization?.type === 'WHOLESALE' && (
|
||||
<Button
|
||||
|
Reference in New Issue
Block a user