feat: TTLock integration + fix agent offline status
- Add TTLock electronic lock module: settings page, room-lock mapping, card issuance via agent command (ttlock:write_card) - Fix agent offline: EquipmentPage now polls every 30s + reacts to workstation:online/offline WebSocket events instantly - Backend broadcasts workstation online/offline events to hotel clients via existing WebSocket (agent-ws.ts) - New DB migration 048_ttlock.sql: hotel_ttlock_config, room_lock_mappings, card_issuances tables - New backend routes: GET/PATCH ttlock/config, POST ttlock/token, GET ttlock/locks, POST/DELETE ttlock/room-locks, POST issue-card - "Выдать ключ (TTLock)" button in BookingDetailPanel for confirmed/checked_in - TTLock page added to sidebar under Настройки Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,7 @@ import { SchedulePage } from './pages/SchedulePage'
|
||||
import { BillingPage } from './pages/BillingPage'
|
||||
import { EquipmentPage } from './pages/EquipmentPage'
|
||||
import { WiFiPage } from './pages/WiFiPage'
|
||||
import { TTLockPage } from './pages/TTLockPage'
|
||||
import { ModuleGuard } from './components/ModuleGuard'
|
||||
|
||||
export default function App() {
|
||||
@@ -96,6 +97,7 @@ export default function App() {
|
||||
<Route path="/billing" element={<BillingPage />} />
|
||||
<Route path="/equipment" element={<EquipmentPage />} />
|
||||
<Route path="/wifi" element={<WiFiPage />} />
|
||||
<Route path="/ttlock" element={<TTLockPage />} />
|
||||
</Route>
|
||||
|
||||
<Route path="/" element={<Navigate to="/login" replace />} />
|
||||
|
||||
Reference in New Issue
Block a user