Add room categories, documents module, guest settings, and booking improvements

- New pages: RoomCategoriesPage (category CRUD with photos, color, amenities) and DocumentsPage (template constructor with variable substitution, print packages)
- Sidebar: added "Категории номеров" link under rooms, Documents module via modulesData
- App.tsx: routes for /room-categories and /documents
- RoomModal: now accepts categories prop for categoryId select
- BookingModal: added additional services dropdown (breakfast, transfer, parking etc.) accumulating into booking total; summary shows services breakdown
- SettingsPage: new "Гости" section with guest tag CRUD (add/edit/remove, color picker, live preview); booking section toggle "Показывать поле Источник бронирования"
- modulesData: added Documents module entry (free tier, sidebar item)
- RoomsPage: passes MOCK_CATEGORIES to RoomModal
- ReviewsPage: rewritten with auto-redirect logic, threshold slider, platform settings tab

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 22:17:54 +03:00
parent 56df6711e4
commit 96dfd755ed
11 changed files with 1816 additions and 529 deletions

View File

@@ -42,6 +42,16 @@ export type RoomStatus = 'available' | 'occupied' | 'maintenance' | 'blocked'
export type HousekeepingStatus = 'clean' | 'dirty' | 'cleaning' | 'inspect'
export type BedType = 'single' | 'double' | 'queen' | 'king' | 'twin'
export interface RoomCategory {
id: string
hotelId: string
name: string
description: string
photos: string[]
color: string
amenities: string[]
}
export interface Room {
id: string
hotelId: string
@@ -58,6 +68,19 @@ export interface Room {
sortOrder: number
allowHourly?: boolean
hourlyRate?: number
description?: string
photos?: string[]
categoryId?: string
}
export interface DocumentTemplate {
id: string
hotelId: string
name: string
type: 'registration' | 'invoice' | 'contract' | 'info'
content: string
forCheckIn: boolean
printOrder: number
}
// ─── Guest ───────────────────────────────────────────────────────────────────