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

+20
View File
@@ -6,6 +6,7 @@ import {
getMyCheckins,
getMyPreferences,
getMySpeakerSessions,
removeSessionMaterial,
sessionMaterialUrl,
setPreference,
uploadSessionMaterial,
@@ -114,6 +115,19 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
}
}
async function handleDeleteMaterial() {
if (!selected) return;
if (!confirm('Remove this material? You can upload a new one.')) return;
try {
await removeSessionMaterial(selected.id);
toast('Material removed', 'ok');
setSelected(null);
reload();
} catch (err) {
toast(err instanceof Error ? err.message : 'Could not remove material', 'err');
}
}
return (
<section className="screen">
<div className="row between">
@@ -222,6 +236,12 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
📎 Download material
</a>
)}
{/* Speakers can remove their own material to re-upload. */}
{selISpeaker && selected.material_path && (
<button className="btn danger" onClick={handleDeleteMaterial}>
🗑 Remove material
</button>
)}
</div>
</>
)}