fix(admin): per-row check-in toggle; feat(db): front-desk gate + badge copies
Registrations table felt buggy because both row actions did setBusy(true) -> write -> reloadRegistrations() -> setBusy(false): the list is sorted by points, so a reload made the row you just touched jump (or vanish under a Checked-in filter), and the single `busy` flag disabled every control in the table for the whole request. The fix is per-row in-flight state (busyIds + withRowBusy) and no reload at all: the toggle patches its own row's checked_in plus the points delta the RPC returns, the type change patches `type`; a rejected write rolls both back. Only the touched row is disabled, shows a "Saving…" pulse, and two rows can save at once. Toggle hit area is now 40x41 px with a focus-visible ring. Front-desk gate: checkin_attendee reads registrations.checked_in and raises "This attendee needs to be checked in at the front desk first." when it is not true, and no longer sets checked_in as a side effect. checkins has no INSERT policy, so the RPC is the only write path and the gate cannot be bypassed. The scanner shows a dedicated "Not checked in yet" sheet instead of a toast. Badge copies: events.badge_copies (1..4, default 1). welcome_checkin sends that many pgmq jobs in one transaction (the Pi prints one label per job, so N jobs = N labels; no worker change) and clamps the value again itself. preview_welcome_checkin gained a `copies` column (drop + recreate) so the popup states the real count. Manual reprint still prints exactly one. Set from Settings -> Badge printing (active event) and the Events form, always as a single-column update; the Settings badge section now renders even when the LLM settings call fails. Tests: badge_print 113 (+6), leaderboard 47 (+1), new registration-checkin-toggle (6), front-desk-gate (3), welcome-badge-copies (3); the stale registrations-PATCH mock in registration-ticket-merge now targets set_registration_checked_in, the ambiguous Save button is "Save copies", and the print-copy assertion tolerates the typographic apostrophe. Docs updated (rpcs, schema, printing, tests, admin-app, screens) with a release record; NOT deployed - see docs/releases/2026-10-19.md.
This commit is contained in:
1 parent
c857204cfe
commit
c49a94fe80
27 files changed
+1378
-73
No files matched your search
@@ -81,6 +81,7 @@ queries everything for the active event and handles "no active event" gracefully
|
||||
| `sessionize_endpoint` | `text` | nullable — the Sessionize API URL for this event (see [sidecar.md](./sidecar.md)) |
|
||||
| `use_realtime_clock` | `boolean` | default `false` — when `true`, the attendee app drives slot status (Live/Next/Done) from the real system clock; when `false` it uses the simulated mid-event clock (see [../frontend/app-structure.md](../frontend/app-structure.md)) |
|
||||
| `talk_networking_bonus` | `integer` | default `2` — bonus points awarded to **each** party when two people who were checked into the same session (talk) accept a connection. `0` disables the feature (the +5 connection award still applies). Awarded with the `talk_networking` points category (see [rpcs.md](./rpcs.md#accept_connectionp_connection_id-uuid)) |
|
||||
| `badge_copies` | `integer` | default `1`, `check (between 1 and 4)` — how many badge labels a **welcome (front-desk) check-in** prints. Enforced again inside `welcome_checkin`, so a hand-edited row cannot flood the queue. Manual reprint ignores it and always prints one. Set from **Settings → Badge printing** (see [printing.md](./printing.md)) |
|
||||
| `last_synced_at` | `timestamptz` | nullable — when the Sessionize sync last ran |
|
||||
| `created_at` | `timestamptz` | |
|
||||
|
||||
@@ -98,7 +99,7 @@ Points are scoped **per event** here (one row per contact per event).
|
||||
| `event_id` | `uuid` FK → `events` | `on delete cascade` |
|
||||
| `contact_email` | `text` FK → `contacts` | `on delete cascade` |
|
||||
| `type` | `registration_type` (enum) | `attendee` \| `speaker` \| `staff` \| `sponsor` (default `attendee`) |
|
||||
| `checked_in` | `boolean` | default `false` |
|
||||
| `checked_in` | `boolean` | default `false` — **the front-desk flag.** Set by the welcome check-in (or an admin's Registrations toggle); it is what makes someone eligible for session check-ins. `checkin_attendee` refuses anyone with this flag `false` |
|
||||
| `points` | `integer` | `>= 0`, default 0 |
|
||||
| `qr_token` | `text` | nullable — the lanyard token; **doubles as the Auth password** (generated per event) |
|
||||
| `external_id` | `text` | nullable — reserved for an external system's id (currently unused) |
|
||||
|
||||
Reference in new issue
Block a user