Initial commit: HotelSync PMS v0.1.0

- React 18 + TypeScript + Vite + Tailwind CSS
- Шахматка бронирований (drag-to-book)
- Страницы: Calendar, Bookings, Rooms, Housekeeping, Channels, API Docs, Settings
- Роли: super_admin, hotel_manager, housekeeper
- Светлая/тёмная тема
- Docker + Nginx конфигурация
- Лендинг hotelsync.ru
This commit is contained in:
2026-03-10 20:38:32 +03:00
commit 420d55d57e
45 changed files with 7274 additions and 0 deletions

25
src/layouts/AppLayout.tsx Normal file
View File

@@ -0,0 +1,25 @@
import { Outlet, Navigate } from 'react-router-dom'
import { useState } from 'react'
import { Sidebar } from '../components/layout/Sidebar'
import { Topbar } from '../components/layout/Topbar'
import { useAuth } from '../contexts/AuthContext'
export function AppLayout() {
const { user } = useAuth()
const [sidebarOpen, setSidebarOpen] = useState(false)
if (!user) return <Navigate to="/login" replace />
return (
<div className="flex h-screen bg-slate-50 dark:bg-slate-900 overflow-hidden">
<Sidebar open={sidebarOpen} onClose={() => setSidebarOpen(false)} />
<div className="flex-1 flex flex-col min-w-0">
<Topbar onMenuToggle={() => setSidebarOpen(v => !v)} />
<main className="flex-1 overflow-auto">
<Outlet />
</main>
</div>
</div>
)
}