Redesign Phases 3-6: multi-event model, APPE Admin, Convivo App behaviors, APPE branding

- Phase 3: new migration 20260824000000_redesign.sql (contacts/events/registrations/sponsors, slot types, session speakers + feedback/material), seed rewrite
- Phase 4: APPE Admin rebrand + Contacts/Registrations/Sponsors/Schedule/Activity/Events views
- Phase 5: Convivo App (24h login, 5s polling, QR type badge, red dot, speaker material)
- Phase 6: APPE favicon + PWA icons for both apps
- Docs: schema/rpcs/rls/seed/screens/api-client/admin-app/architecture/next-steps/README/roadmap updated

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 02:53:16 +02:00
1 parent 2f53d47578
commit 7605c9bbf4
64 files changed
+4593 -1371

No files matched your search

+16 -12
View File
@@ -12,15 +12,17 @@ const CATEGORY_LABEL: Record<PointsLogRow['category'], string> = {
};
export function Profile() {
const { profile, signOut } = useAuth();
const { contact, registration, signOut } = useAuth();
const [log, setLog] = useState<PointsLogRow[]>([]);
const [loading, setLoading] = useState(true);
const email = contact?.email ?? '';
useEffect(() => {
let active = true;
(async () => {
try {
const data = await getMyPointsLog();
const data = await getMyPointsLog(email);
if (active) setLog(data);
} catch {
/* non-fatal */
@@ -31,10 +33,11 @@ export function Profile() {
return () => {
active = false;
};
}, []);
}, [email]);
if (!profile) return null;
if (!contact) return null;
const points = registration?.points ?? 0;
const totals: Record<string, number> = {};
for (const l of log) totals[l.category] = (totals[l.category] ?? 0) + l.delta;
@@ -42,19 +45,20 @@ export function Profile() {
<section className="screen">
<div className="h1">Profile</div>
<div className="card" style={{ textAlign: 'center' }}>
<Avatar name={profile.full_name} id={profile.id} size={72} fs={26} />
<div className="h2" style={{ marginTop: 10 }}>{profile.full_name}</div>
<div className="muted small">{profile.company ?? ''}</div>
<Avatar name={contact.full_name} id={contact.email} size={72} fs={26} />
<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 }}>
<span className="pill violet">{profile.role}</span>
<span className="pill amber">⚡ {profile.points} pts</span>
{registration && <span className={`pill reg-${registration.type}`}>{registration.type.replace('_', ' ')}</span>}
{contact.is_admin && <span className="pill admin">staff</span>}
<span className="pill amber">⚡ {points} pts</span>
</div>
</div>
<div className="card qr-wrap">
<div className="h2">My QR code</div>
{profile.qr_token ? (
<QrImage value={profile.qr_token} size={180} />
{contact.qr_token ? (
<QrImage value={contact.qr_token} size={180} />
) : (
<div className="muted small">No QR token assigned.</div>
)}
@@ -79,7 +83,7 @@ export function Profile() {
))}
<div className="break-row">
<span style={{ fontWeight: 700 }}>Total</span>
<span className="v">{profile.points}</span>
<span className="v">{points}</span>
</div>
</>
)}