Registration optionset + speaker auto-promote + welcome check-in
- registrations.type is now a Postgres ENUM (registration_type) - session_speakers trigger auto-promotes attendee -> speaker (never overrides staff/sponsor) - new welcome_checkin RPC: staff marks an attendee present at the event - admin Registrations: QR token is final (no reset); failed sponsor change opens in-place sponsor lookup - Convivo Home: Now/Next cards always render; red pending-material pill + popup for speakers - Convivo Agenda: speakers can delete their material to re-upload - Convivo Scan: staff Session/Welcome check-in toggle (uiverse switch) - seed: staff (Bruno/Rita) get a password so staff QR login works after reset
This commit is contained in:
1 parent
1bffae9777
commit
1cbbd1b529
16 files changed
+730
-142
No files matched your search
@@ -94,7 +94,7 @@ Points are scoped **per event** here (one row per contact per event).
|
||||
| `id` | `uuid` PK | |
|
||||
| `event_id` | `uuid` FK → `events` | `on delete cascade` |
|
||||
| `contact_email` | `text` FK → `contacts` | `on delete cascade` |
|
||||
| `type` | `text` | `attendee` \| `speaker` \| `staff` \| `sponsor` (default `attendee`) |
|
||||
| `type` | `registration_type` (enum) | `attendee` \| `speaker` \| `staff` \| `sponsor` (default `attendee`) |
|
||||
| `checked_in` | `boolean` | default `false` |
|
||||
| `points` | `integer` | `>= 0`, default 0 |
|
||||
| `qr_token` | `text` | nullable — the lanyard token; **doubles as the Auth password** (generated per event) |
|
||||
@@ -105,6 +105,14 @@ Points are scoped **per event** here (one row per contact per event).
|
||||
per event. Partial unique indexes: `registrations_external_id_uniq (external_id) WHERE external_id IS NOT NULL`
|
||||
and `registrations_qr_token_uniq (qr_token) WHERE qr_token IS NOT NULL` (fast lanyard lookups).
|
||||
|
||||
**`type` is a Postgres ENUM** (`public.registration_type`), not free text — the
|
||||
four ticket types are enforced at the database level.
|
||||
|
||||
**Speaker auto-promote:** the `session_speakers_speaker_promote` trigger (after
|
||||
insert on `session_speakers`) promotes a contact's active-event registration from
|
||||
`attendee` → `speaker` when they're added as a speaker. It is one-way (removing a
|
||||
speaker never demotes) and never overrides an explicit `staff`/`sponsor` ticket.
|
||||
|
||||
## `sponsors` — a sponsor for an event
|
||||
|
||||
Unpaid sponsors are hidden from non-admins (RLS).
|
||||
|
||||
Reference in new issue
Block a user