'use client' import { useQuery } from '@apollo/client' import { BarChart3, ChevronLeft, ChevronRight, DollarSign, Handshake, Home, LogOut, MessageCircle, Settings, Store, TrendingUp, Truck, Users, Warehouse, Wrench, } from 'lucide-react' import { usePathname, useRouter } from 'next/navigation' import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' import { Button } from '@/components/ui/button' import { GET_CONVERSATIONS, GET_INCOMING_REQUESTS, GET_PENDING_SUPPLIES_COUNT } from '@/graphql/queries' import { useAuth } from '@/hooks/useAuth' import { useRealtime } from '@/hooks/useRealtime' import { useSidebar } from '@/hooks/useSidebar' // Компонент для отображения логистических заявок (только для логистики) function LogisticsOrdersNotification() { const { data: pendingData, refetch: _refetchPending } = useQuery(GET_PENDING_SUPPLIES_COUNT, { fetchPolicy: 'cache-first', errorPolicy: 'ignore', }) const logisticsCount = pendingData?.pendingSuppliesCount?.logisticsOrders || 0 if (logisticsCount === 0) return null return (
{getOrganizationName()}
{getCabinetType()}