Add Guests page with history/ratings and booking discounts

- New /guests page: searchable guest list with stay history, payment
  summary, rating (1-5 stars), loyalty status (Базовый/Серебряный/Золотой),
  tags (VIP, Постоянный, Корпоративный, Медовый месяц, Проблемный),
  per-guest notes, inline payments tab with debt tracking
- Guest detail modal: 3 tabs — Обзор / История проживания / Платежи
- Sidebar: added "Гости" link (UsersRound icon) in Основное section
- BookingModal: discount block — % or fixed ₽ amount, free-stay checkbox
  that zeroes room cost; summary shows strikethrough original + discount line;
  total reflects discount applied before services

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 16:42:39 +03:00
parent 6010531114
commit acc17387a7
4 changed files with 738 additions and 10 deletions

View File

@@ -1,7 +1,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,
FileText, LayoutDashboard, Building2, Users, X, Hotel, Puzzle, CalendarRange, Map, LayoutGrid, UserCog, UsersRound,
} from 'lucide-react'
import { useAuth } from '../../contexts/AuthContext'
import { useModules } from '../../contexts/ModulesContext'
@@ -120,6 +120,7 @@ export function Sidebar({ open, onClose }: SidebarProps) {
{!isHousekeeper && (
<>
<NavItem to="/bookings" icon={BookOpen} label="Бронирования" onClick={onClose} />
<NavItem to="/guests" icon={UsersRound} label="Гости" onClick={onClose} />
<NavItem to="/rooms" icon={BedDouble} label="Номера" onClick={onClose} />
<NavItem to="/room-categories" icon={LayoutGrid} label="Категории номеров" onClick={onClose} />
<NavItem to="/availability" icon={CalendarRange} label="Доступность" onClick={onClose} />