feat: move rental module to main nav under Цены и тарифы
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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} />
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user