feat: move rental module to main nav under Цены и тарифы

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 22:46:39 +03:00
parent 20582581be
commit 370fe8a9a9

View File

@@ -2,7 +2,7 @@ import { NavLink, useNavigate } from 'react-router-dom'
import {
CalendarDays, BookOpen, BedDouble, Globe, Settings,
FileText, LayoutDashboard, Building2, Users, X, Hotel, Puzzle, CalendarRange, Map, LayoutGrid, UserCog, UsersRound,
TrendingUp, Tag, Award, Wrench, Utensils,
TrendingUp, Tag, Award, Wrench, Utensils, CalendarClock,
} from 'lucide-react'
import { useAuth } from '../../contexts/AuthContext'
import { useModules } from '../../contexts/ModulesContext'
@@ -45,7 +45,7 @@ export function Sidebar({ open, onClose }: SidebarProps) {
const isModuleActive = (id: string) => statuses[id] === 'active' || statuses[id] === 'trial'
// Core modules with dedicated nav positions (not shown in generic module list)
const CORE_MODULE_IDS = ['channel-manager']
const CORE_MODULE_IDS = ['channel-manager', 'rental']
// Module items for the "Модули" sidebar section
const activeModuleItems = MODULES_DATA.filter(
@@ -133,6 +133,9 @@ export function Sidebar({ open, onClose }: SidebarProps) {
<NavItem to="/tariffs" icon={Utensils} label="Тарифы" onClick={onClose} />
<NavItem to="/dynamic-pricing" icon={TrendingUp} label="Динамические цены" onClick={onClose} />
<NavItem to="/discounts" icon={Tag} label="Скидки" onClick={onClose} />
{isModuleActive('rental') && (
<NavItem to="/rental" icon={CalendarClock} label="Аренда объектов" onClick={onClose} />
)}
</>
)}