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

+26 -11
View File
@@ -4,19 +4,21 @@ import { useEvent } from '../lib/useEvent';
import { getMyCheckins, getMyPreferences } from '../lib/api';
import { fmtRange, greeting, slotStatus } from '../lib/time';
import type { Preference } from '../lib/types';
import { Avatar, Spinner } from '../components/ui';
import { Avatar, Empty, Spinner } from '../components/ui';
export function Home({ go }: { go: (tab: string) => void }) {
const { profile } = useAuth();
const { slots, sessionById, now, loading } = useEvent();
const { contact, registration } = useAuth();
const { event, slots, sessionById, now, loading } = useEvent();
const [prefs, setPrefs] = useState<Preference[]>([]);
const [checkins, setCheckins] = useState<string[]>([]);
const email = contact?.email ?? '';
useEffect(() => {
let active = true;
(async () => {
try {
const [p, c] = await Promise.all([getMyPreferences(), getMyCheckins()]);
const [p, c] = await Promise.all([getMyPreferences(), getMyCheckins(email)]);
if (!active) return;
setPrefs(p);
setCheckins(c);
@@ -27,9 +29,9 @@ export function Home({ go }: { go: (tab: string) => void }) {
return () => {
active = false;
};
}, []);
}, [email]);
if (loading || !profile) {
if (loading || !contact) {
return (
<section className="screen">
<div className="center" style={{ flex: 1 }}>
@@ -39,6 +41,19 @@ export function Home({ go }: { go: (tab: string) => void }) {
);
}
if (!event) {
return (
<section className="screen">
<div className="h1">APPE</div>
<div className="card" style={{ marginTop: 16 }}>
<Empty icon="📅" text="No active event right now. Check back soon!" />
</div>
</section>
);
}
const points = registration?.points ?? 0;
const isStaff = contact.is_admin;
const pickFor = (slotId: number) => prefs.find((p) => p.slot_id === slotId)?.session_id;
const current = slots.find(({ slot }) => slotStatus(slot, now) === 'now');
const next = slots.find(({ slot }) => slotStatus(slot, now) === 'next');
@@ -46,16 +61,16 @@ export function Home({ go }: { go: (tab: string) => void }) {
const nowSession = current ? sessionById.get(pickFor(current.slot.id) ?? '') : undefined;
const nextSession = next ? sessionById.get(pickFor(next.slot.id) ?? '') : undefined;
const firstName = profile.full_name.split(' ')[0];
const firstName = contact.full_name.split(' ')[0];
return (
<section className="screen">
<div className="row between">
<div>
<div className="h1">{greeting(now)}, {firstName} 👋</div>
<div className="muted small">Wed 23 Oct · Convivo Conf</div>
<div className="muted small">{event.name}</div>
</div>
<div className="points-pill" onClick={() => go('leaderboard')}>⚡ {profile.points}</div>
<div className="points-pill" onClick={() => go('leaderboard')}>⚡ {points}</div>
</div>
{nowSession && current && (
@@ -114,7 +129,7 @@ export function Home({ go }: { go: (tab: string) => void }) {
<div className="qa-grid">
<div className="qa" onClick={() => go('scan')}>
<span className="ico">📷</span>
<span className="lbl">{profile.role === 'staff' ? 'Check-in' : 'Scan & connect'}</span>
<span className="lbl">{isStaff ? 'Check-in' : 'Scan & connect'}</span>
</div>
<div className="qa" onClick={() => go('agenda')}>
<span className="ico">📅</span>
@@ -131,7 +146,7 @@ export function Home({ go }: { go: (tab: string) => void }) {
</div>
<div style={{ height: 8 }} />
<div className="muted small" style={{ textAlign: 'center', opacity: 0.5 }}>
<Avatar name={profile.full_name} id={profile.id} size={22} fs={9} /> {profile.company ?? ''}
<Avatar name={contact.full_name} id={contact.email} size={22} fs={9} /> {registration?.type.replace('_', ' ') ?? ''}
</div>
</section>
);