Files
sfera/src/components/economics/wholesale-economics-page.tsx
Bivekich 9da1fe9e78 Исправлена навигация сайдбара: убраны перезагрузки страницы и добавлен персистентный сайдбар
- Создан layout для (dashboard) группы с персистентным сайдбаром
- Заменен window.location.href на router.push() в хуках авторизации
- Перемещены все страницы в (dashboard) группу для единого layout
- Удалены дублирующие <Sidebar /> компоненты из индивидуальных страниц
- Исправлены все компоненты dashboard для использования getSidebarMargin()
- Добавлена skeleton загрузка кнопок сайдбара для плавного UX
- Исправлены критические синтаксические ошибки в JSX компонентах
- Удалены дублирующие main теги и исправлена структура layout

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 19:23:51 +03:00

49 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client'
import { BarChart3 } from 'lucide-react'
import { Card } from '@/components/ui/card'
import { useAuth } from '@/hooks/useAuth'
import { useSidebar } from '@/hooks/useSidebar'
export function WholesaleEconomicsPage() {
const { user } = useAuth()
const { getSidebarMargin } = useSidebar()
const getOrganizationName = () => {
if (user?.organization?.name) {
return user.organization.name
}
if (user?.organization?.fullName) {
return user.organization.fullName
}
return 'Вашей организации'
}
return (
<div className={`${getSidebarMargin()} px-6 py-4 overflow-hidden transition-all duration-300 h-full`}>
<div className="p-8">
{/* Заголовок страницы */}
<div className="mb-8">
<h1 className="text-3xl font-bold text-white mb-2">Экономика поставщика</h1>
<p className="text-white/60">Финансовые показатели {getOrganizationName()}</p>
</div>
{/* Карточка-заглушка */}
<Card className="bg-white/10 backdrop-blur border-white/20 p-6">
<div className="flex items-center space-x-3 mb-4">
<BarChart3 className="h-8 w-8 text-blue-400" />
<h3 className="text-xl font-semibold text-white">Экономические показатели</h3>
</div>
<div className="space-y-2">
<p className="text-white font-medium">Раздел находится в разработке</p>
<p className="text-white/60 text-sm">Будет добавлен позже</p>
</div>
</Card>
</div>
</div>
)
}