feat: collapsible sidebar groups + favorites, chat hide setting, billing page, module route guards
This commit is contained in:
@@ -3,7 +3,7 @@ import { useState, useEffect } from 'react'
|
||||
import {
|
||||
CalendarDays, BookOpen, BedDouble, Globe, Settings,
|
||||
FileText, LayoutDashboard, Building2, Users, X, Hotel, Puzzle, CalendarRange, Map, LayoutGrid, UserCog, UsersRound,
|
||||
TrendingUp, Tag, Award, Wrench, Utensils, CalendarClock, Zap, ChevronRight, Star,
|
||||
TrendingUp, Tag, Award, Wrench, Utensils, CalendarClock, Zap, ChevronRight, Star, CreditCard,
|
||||
} from 'lucide-react'
|
||||
import { useAuth } from '../../contexts/AuthContext'
|
||||
import { useModules } from '../../contexts/ModulesContext'
|
||||
@@ -185,7 +185,7 @@ export function Sidebar({ open, onClose }: SidebarProps) {
|
||||
prices: ['/tariffs', '/dynamic-pricing', '/discounts', '/rental'],
|
||||
service: ['/housekeeping', '/technical', ...activeModuleItems.map(m => m.sidebarItem!.path)],
|
||||
management: ['/users', '/schedule', '/loyalty', '/maintenance', '/floor-map', '/channels'],
|
||||
settingsGroup:['/modules', '/settings'],
|
||||
settingsGroup:['/modules', '/settings', '/billing'],
|
||||
devGroup: ['/api-docs'],
|
||||
}
|
||||
|
||||
@@ -410,8 +410,9 @@ export function Sidebar({ open, onClose }: SidebarProps) {
|
||||
<GroupHeader label="Настройки" isOpen={groups.settingsGroup} onToggle={() => toggleGroup('settingsGroup')} />
|
||||
{groups.settingsGroup && (
|
||||
<div className="space-y-0.5">
|
||||
<NavItem to="/modules" icon={Puzzle} label="Модули" {...navItemProps} />
|
||||
<NavItem to="/settings" icon={Settings} label="Настройки" {...navItemProps} />
|
||||
<NavItem to="/modules" icon={Puzzle} label="Модули" {...navItemProps} />
|
||||
<NavItem to="/settings" icon={Settings} label="Настройки" {...navItemProps} />
|
||||
<NavItem to="/billing" icon={CreditCard} label="Тарифы и оплата" {...navItemProps} />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user