diff --git a/src/components/Layout/Header.tsx b/src/components/Layout/Header.tsx
index 467d563..71b2bf1 100644
--- a/src/components/Layout/Header.tsx
+++ b/src/components/Layout/Header.tsx
@@ -1,14 +1,89 @@
import {
Group, Burger, Text, Avatar, Menu, ActionIcon, Button, Kbd, Breadcrumbs, Box, UnstyledButton,
- useMantineColorScheme, useComputedColorScheme,
+ Popover, Indicator, ThemeIcon, Stack, ScrollArea,
} from '@mantine/core'
import { spotlight } from '@mantine/spotlight'
-import { IconLogout, IconSearch, IconSun, IconMoon, IconUser } from '@tabler/icons-react'
+import {
+ IconLogout, IconSearch, IconBell, IconBriefcase, IconCheck, IconX, type Icon
+} from '@tabler/icons-react'
import { useLocation } from 'react-router-dom'
import { useAuth } from '@/hooks/useAuth'
import { findTrail } from './navigation'
import { ColorSchemeToggle } from '@/components/ui/ColorSchemeToggle'
+// Заглушки для Центра уведомлений
+const MOCK_NOTIFICATIONS = [
+ {
+ id: 1,
+ title: 'Новая задача',
+ text: 'Вам назначена задача по заявке #1024: «Подготовить договор»',
+ time: '10 мин назад',
+ icon: IconBriefcase,
+ color: 'blue',
+ unread: true,
+ },
+ {
+ id: 2,
+ title: 'Заявка согласована',
+ text: 'Заявка #980 успешно согласована всеми участниками',
+ time: '1 час назад',
+ icon: IconCheck,
+ color: 'green',
+ unread: true,
+ },
+ {
+ id: 3,
+ title: 'Заявка отклонена',
+ text: 'Иван Иванов отклонил вашу заявку #975',
+ time: 'Вчера, 15:30',
+ icon: IconX,
+ color: 'red',
+ unread: false,
+ },
+]
+
+function NotificationItem({
+ title, text, time, icon: IconCmp, color, unread
+ }: {
+ title: string; text: string; time: string; icon: Icon; color: string; unread: boolean
+}) {
+ return (
+ ({
+ borderBottom: '1px solid var(--mantine-color-default-border)',
+ width: '100%',
+ backgroundColor: unread ? 'var(--mantine-color-default-hover)' : 'transparent',
+ transition: 'background-color 150ms',
+ '&:hover': { backgroundColor: 'var(--mantine-color-default-hover)' },
+ })}
+ >
+
+
+
+
+
+
+ {title}
+ {unread && (
+
+ )}
+
+ {text}
+ {time}
+
+
+
+ )
+}
+
interface HeaderProps {
toggleMobile: () => void
toggleDesktop: () => void
@@ -22,6 +97,8 @@ export default function Header({ toggleMobile, toggleDesktop, mobileOpened, desk
const trail = findTrail(pathname)
const role = user?.is_root ? 'Суперадмин' : user?.is_observer ? 'Наблюдатель' : 'Администратор'
+ const unreadCount = MOCK_NOTIFICATIONS.filter((n) => n.unread).length
+
return (
@@ -72,6 +149,43 @@ export default function Header({ toggleMobile, toggleDesktop, mobileOpened, desk
+ {/* Центр уведомлений */}
+
+
+
+
+
+
+
+
+
+
+ Уведомления
+ {unreadCount > 0 && (
+
+ )}
+
+
+
+ {MOCK_NOTIFICATIONS.length > 0 ? (
+
+ {MOCK_NOTIFICATIONS.map((notif) => (
+
+ ))}
+
+ ) : (
+ Нет новых уведомлений
+ )}
+
+
+
+