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:
committed 2026-08-23 10:39:21 +02:00
1 parent 3fd8feca53
commit 2f3952dc71
30 files changed
+1083 -232

No files matched your search

+18 -15
View File
@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { useAuth } from '../context/AuthContext';
import { useEvent } from '../lib/useEvent';
import { getMyCheckins, getMyPreferences } from '../lib/api';
import { fmtRange, greeting, slotStatus } from '../lib/time';
import { capWords, fmtRange, greeting, slotStatus } from '../lib/time';
import type { Preference } from '../lib/types';
import { Avatar, Empty, Spinner } from '../components/ui';
@@ -107,22 +107,23 @@ export function Home({ go }: { go: (tab: string) => void }) {
<div>
<div className="row between" style={{ marginBottom: 9 }}>
<span className="h2">My picks today</span>
<span className="muted small">tap to change</span>
<a className="muted small link" onClick={() => go('agenda')}>tap to change</a>
</div>
<div style={{ display: 'flex', flexDirection: 'column' }}>
{slots.map(({ slot }) => {
const sid = pickFor(slot.id);
const s = sid ? sessionById.get(sid) : undefined;
return (
<button key={slot.id} className="pick-chip" onClick={() => go('agenda')}>
<span className="t">{fmtRange(slot)}</span>
{[
{ label: 'Now', slot: current?.slot, session: nowSession },
{ label: 'Next', slot: next?.slot, session: nextSession },
]
.filter((r) => r.slot)
.map((r) => (
<button key={r.label} className="pick-chip" onClick={() => go('agenda')}>
<span className="t">{fmtRange(r.slot!)}</span>
<span className="grow" style={{ fontWeight: 600, textAlign: 'left' }}>
{s ? s.title : 'No pick yet'}
{r.session ? r.session.title : 'No pick yet'}
</span>
{s && <span className="muted small">{s.room}</span>}
{r.session && <span className="muted small">{r.session.room}</span>}
</button>
);
})}
))}
</div>
</div>
@@ -145,9 +146,11 @@ export function Home({ go }: { go: (tab: string) => void }) {
</div>
</div>
<div style={{ height: 8 }} />
<div className="muted small" style={{ textAlign: 'center', opacity: 0.5 }}>
<Avatar name={contact.full_name} id={contact.email} size={22} fs={9} /> {registration?.type.replace('_', ' ') ?? ''}
</div>
{registration && registration.type !== 'attendee' && (
<div className="muted small" style={{ textAlign: 'center', opacity: 0.5 }}>
<Avatar name={contact.full_name} id={contact.email} size={22} fs={9} /> {capWords(registration.type)}
</div>
)}
</section>
);
}