feat: TTLock encoder per workstation (Option A)
- Migration 051: add ttlock_com_port to workstations, drop com_port/workstation_id from hotel_ttlock_config - Backend workstations PATCH: accepts ttlock_com_port alongside name - Backend ttlock: test/issue-card use per-workstation com_port; auto-select online encoder if workstationId not specified - TTLockPage Step 2: per-workstation table with COM port input, Save, Test buttons per row - BookingDetailPanel: auto-issue if 1 encoder online, picker modal if multiple - api.ts: TTLockConfig/Update cleaned up, Workstation gets ttlockComPort, issueCard/testEncoder updated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
9
backend/migrations/051_workstation_ttlock_com_port.sql
Normal file
9
backend/migrations/051_workstation_ttlock_com_port.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Move TTLock encoder COM port from global config to per-workstation
|
||||
ALTER TABLE workstations
|
||||
ADD COLUMN IF NOT EXISTS ttlock_com_port TEXT;
|
||||
|
||||
-- Remove workstation_id and com_port from global TTLock config
|
||||
-- (com_port and workstation_id are now per-workstation)
|
||||
ALTER TABLE hotel_ttlock_config
|
||||
DROP COLUMN IF EXISTS workstation_id,
|
||||
DROP COLUMN IF EXISTS com_port;
|
||||
Reference in New Issue
Block a user