Kiosk: live-force reset to welcome screen, configurable inactivity timeout
Kiosk's SSE connection now stays open for the whole session instead of closing the moment a booking is pushed, so a staff-triggered Reset (from the extension/Terminals popup or the Devices admin page) now actually forces the tablet back to the welcome screen immediately, discarding whatever was mid-entry — not just flipping its status in the DB with nothing listening tablet-side. Removed the two now-redundant/harmful pushIdle() calls in routes/checkin.js's own submit success/failure paths, which would otherwise race the confirmation/error screen now that the stream stays open. Added a confirm() prompt before Reset on both trigger surfaces since it's now a real interruption, not just an unstick. Also made the tablet's inactivity auto-cancel timeout configurable from Settings (checkin_inactivity_timeout_minutes, default 5, same as the old hardcoded value) instead of a fixed constant, read via the existing token-gated GET /api/checkin/:token response.
This commit is contained in:
parent
790431c446
commit
5180adf8d2
10 changed files with 84 additions and 14 deletions
|
|
@ -10,7 +10,7 @@ export default function Settings() {
|
|||
const [settings, setSettings] = useState<AppSettings>({
|
||||
regcard_custom_field_id: '',
|
||||
online_checkin_complete_custom_field_id: '', terms_and_conditions_text: '',
|
||||
excluded_email_domains: '',
|
||||
excluded_email_domains: '', checkin_inactivity_timeout_minutes: '5',
|
||||
})
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [saving, setSaving] = useState(false)
|
||||
|
|
@ -168,6 +168,20 @@ export default function Settings() {
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div className="section-title">Tablet Inactivity Timeout</div>
|
||||
<div className="field" style={{ maxWidth: 200, marginBottom: 20 }}>
|
||||
<label>Minutes before an untouched check-in auto-cancels</label>
|
||||
<input
|
||||
type="number" min={1} max={60} value={settings.checkin_inactivity_timeout_minutes}
|
||||
onChange={e => setSettings(s => ({ ...s, checkin_inactivity_timeout_minutes: e.target.value }))}
|
||||
/>
|
||||
<p className="field-hint">
|
||||
If a guest starts a check-in on the tablet and stops touching the screen for this long, it
|
||||
auto-cancels and returns to the welcome screen — same safety net as the Cancel button and a
|
||||
staff-triggered Reset, just on a timer instead of a tap.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: 24 }}>
|
||||
<button className="btn btn-primary" disabled={saving} onClick={handleSave}>
|
||||
{saving ? 'Saving…' : 'Save Settings'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue