Fixes & Refinements: QR token on registration, role caps, connection detail + red dot, admin schedule/sponsors
Datamodel: - Move qr_token from contacts to registrations (per event); new migration 20260826000000. lanyard_lookup / create_connection_request / checkin_attendee resolve via registrations + active event. - reset_qr_token -> reset_registration_qr_token (fixes ambiguous 'email' col). - upsert_contact drops the token arg; create_registration generates + syncs it. - Pretix sync writes the token to the registration (keeps it on re-sync). Registration types: - Distinct pill colors; red reserved for Staff (both apps). - Roles capitalized everywhere (Attendee/Speaker/Sponsor/Staff); 'Attendee' hidden only at the Home footer. - Reset-token button moved from Contacts to Registrations (per registration). Sessions (APPE Admin): - Slot types capitalized; material submitted/not-submitted state. - Speaker selection = multi-select search dropdown. - Fix 'a session must have a speaker' on edit (diff-based setSessionSpeakers) and the file-upload bug (speaker save no longer aborts first). APPE Admin: - Sponsors contact lookup = search field (filter + pick). Convivo App: - Other people's QR codes hidden; connection detail sheet shows public info + points. - Connect red dot recalculates immediately on accept/decline/send. - 'My picks today' = 2 rows (current + next); 'tap to change' links to Agenda. Docs updated across backend + frontend. Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
3fd8feca53
commit
2f3952dc71
30 files changed
+1083
-232
No files matched your search
+20
-7
@@ -125,28 +125,41 @@ Used by the APPE Admin console to award prizes or correct mistakes. Goes through
|
||||
`_award_points`, so it floors at 0, writes `points_log`, and re-syncs the
|
||||
leaderboard.
|
||||
|
||||
### `reset_qr_token(p_contact_email)` → `(email, qr_token)`
|
||||
**Admin-only.** Regenerates a contact's lanyard QR token.
|
||||
- Generates a fresh `CVV-XXX-NNNN` token and writes it to `contacts.qr_token`.
|
||||
### `reset_registration_qr_token(p_contact_email)` → `(email, qr_token)`
|
||||
**Admin-only.** Regenerates the lanyard QR token of a contact's **registration**
|
||||
for the active event (the token lives on the registration, not the contact).
|
||||
- Requires the contact to have a registration for the active event.
|
||||
- Generates a fresh `CVV-XXX-NNNN` token and writes it to
|
||||
`registrations.qr_token`.
|
||||
- **Re-hashes it as the Auth password** (`extensions.crypt(token,
|
||||
extensions.gen_salt('bf'))` on `auth.users.encrypted_password`), so the **old
|
||||
token stops working** and the contact must re-scan with the new one.
|
||||
- **Deletes the contact's existing `auth.sessions`**, forcing a re-login.
|
||||
- Returns the new token so the admin can print/show it as a QR code.
|
||||
|
||||
> **Implementation note:** the function's output column is named `email`
|
||||
> (`returns table (email, qr_token)`), so any reference to `auth.users.email`
|
||||
> inside the body must be **qualified** (`auth.users.email`) — a bare `email`
|
||||
> is ambiguous between the output column and the table column.
|
||||
|
||||
> **Implementation note:** pgcrypto's `gen_salt` / `crypt` live in the
|
||||
> `extensions` schema (not `public`), so the function — whose `search_path` is
|
||||
> pinned to `public` — must qualify them as `extensions.gen_salt(...)` /
|
||||
> `extensions.crypt(...)`. The function owner (`postgres`) can write
|
||||
> `auth.users` and `auth.sessions`, which is what makes this possible.
|
||||
|
||||
### `upsert_contact(p_email, p_full_name, p_linkedin_url, p_is_admin, p_qr_token)` → `contacts`
|
||||
**Admin-only.** Creates a contact if it doesn't exist (generating a QR token when
|
||||
none is given) or updates the existing one. Returns the contact row.
|
||||
### `upsert_contact(p_email, p_full_name, p_linkedin_url, p_is_admin)` → `contacts`
|
||||
**Admin-only.** Creates a contact if it doesn't exist or updates the existing
|
||||
one. Contacts carry **no QR token** — the token is generated when a registration
|
||||
is created. Ensures an `auth.users` row exists (with a placeholder password) so
|
||||
the contact can log in once a registration token is issued. Returns the contact
|
||||
row.
|
||||
|
||||
### `create_registration(p_contact_email, p_type)` → `registrations`
|
||||
**Admin-only.** Creates a registration for the active event (enforces the
|
||||
sponsor-type rule).
|
||||
sponsor-type rule). **Generates a `CVV-XXX-NNNN` token** on the registration and
|
||||
**syncs it as the Auth password**, so a newly registered contact can log in
|
||||
immediately.
|
||||
|
||||
### `set_registration_type(p_contact_email, p_type)` → `registrations`
|
||||
**Admin-only.** Changes a contact's registration type for the active event.
|
||||
|
||||
Reference in new issue
Block a user