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.
This commit is contained in:
Lago committed 2026-08-23 10:39:21 +02:00
1 parent 005f1d404f
commit b52d8ab007
30 files changed
+1083 -232

No files matched your search

+4 -3
View File
@@ -1,6 +1,7 @@
import { useEffect, useState } from 'react';
import { useAuth } from '../context/AuthContext';
import { getMyPointsLog } from '../lib/api';
import { capWords } from '../lib/time';
import type { PointsLogRow } from '../lib/types';
import { Avatar, QrImage, Spinner } from '../components/ui';
@@ -49,7 +50,7 @@ export function Profile() {
<div className="h2" style={{ marginTop: 10 }}>{contact.full_name}</div>
<div className="muted small">{contact.email}</div>
<div className="row" style={{ justifyContent: 'center', marginTop: 10, gap: 8 }}>
{registration && <span className={`pill reg-${registration.type}`}>{registration.type.replace('_', ' ')}</span>}
{registration && <span className={`pill reg-${registration.type}`}>{capWords(registration.type)}</span>}
{contact.is_admin && <span className="pill admin">staff</span>}
<span className="pill amber">⚡ {points} pts</span>
</div>
@@ -57,8 +58,8 @@ export function Profile() {
<div className="card qr-wrap">
<div className="h2">My QR code</div>
{contact.qr_token ? (
<QrImage value={contact.qr_token} size={180} />
{registration?.qr_token ? (
<QrImage value={registration.qr_token} size={180} />
) : (
<div className="muted small">No QR token assigned.</div>
)}