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:
Lago committed 2026-08-23 21:33:44 +02:00
1 parent 1bffae9777
commit 1cbbd1b529
16 files changed
+730 -142

No files matched your search

+10
View File
@@ -111,6 +111,15 @@ Staff checks an attendee into a session.
> `return query` inside an `if` block would *not* terminate the function and would
> double-award.
### `welcome_checkin(p_attendee_qr)` → `(attendee_email, attendee_name, already)`
Staff **welcome** check-in: marks an attendee present at the **event** (distinct
from `checkin_attendee`, which checks someone into a specific session).
- **Role check:** `is_staff_or_admin()` or it raises `staff or admin only`.
- Resolves the attendee by `qr_token` for the active event.
- Sets `registrations.checked_in = true` (no points — that's the session
check-in's job).
- `already` is `true` if the attendee was already checked in to the event.
### `submit_feedback(p_session_id, p_rating, p_comment)` → `(feedback_id, points, earned)`
Post-session feedback.
- **Requires the caller to be checked in** to that session (else raises).
@@ -166,6 +175,7 @@ immediately.
### `set_registration_type(p_contact_email, p_type)` → `registrations`
**Admin-only.** Changes a contact's registration type for the active event.
`p_type` is `text` and is cast to the `registration_type` enum on write.
### `evaluate_session_feedback(p_session_id)` → `sessions`
**Admin-only.** The **AI-feedback stub**: sets `ai_generated_feedback` to a