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
This commit is contained in:
Lago committed 2026-08-23 02:53:16 +02:00
1 parent 5adb5785aa
commit 22f5f1d317
64 files changed
+4593 -1371

No files matched your search

+29 -5
View File
@@ -1,4 +1,4 @@
import { useState } from 'react';
import { useCallback, useEffect, useState } from 'react';
import { AuthProvider, useAuth } from './context/AuthContext';
import { ToastProvider } from './context/ToastContext';
import { Login } from './screens/Login';
@@ -10,6 +10,8 @@ import { Leaderboard } from './screens/Leaderboard';
import { Profile } from './screens/Profile';
import { Feedback } from './screens/Feedback';
import { Spinner } from './components/ui';
import { getMyConnections } from './lib/api';
import { usePolling } from './lib/usePolling';
type Tab = 'home' | 'agenda' | 'scan' | 'connections' | 'profile' | 'leaderboard';
const TABS: { id: Tab; ico: string; label: string }[] = [
@@ -21,9 +23,28 @@ const TABS: { id: Tab; ico: string; label: string }[] = [
];
function Shell() {
const { session, profile, loading } = useAuth();
const { session, contact, loading } = useAuth();
const [tab, setTab] = useState<Tab>('home');
const [feedbackSession, setFeedbackSession] = useState<string | null>(null);
const [pendingIncoming, setPendingIncoming] = useState(0);
const email = contact?.email ?? '';
const loadPending = useCallback(async () => {
try {
const conns = await getMyConnections();
setPendingIncoming(conns.filter((c) => c.status === 'pending' && c.to_email === email).length);
} catch {
/* non-fatal */
}
}, [email]);
useEffect(() => {
if (email) void loadPending();
}, [email, loadPending]);
// Keep the Connect red-dot fresh: poll every 5s while visible.
usePolling(() => void loadPending(), 5000, !!email);
if (loading) {
return (
@@ -35,7 +56,7 @@ function Shell() {
);
}
if (!session || !profile) {
if (!session || !contact) {
return (
<div className="app">
<Login />
@@ -52,7 +73,7 @@ function Shell() {
);
}
const scanLabel = profile.role === 'staff' || profile.role === 'admin' ? 'Check-in' : 'Scan';
const scanLabel = contact.is_admin ? 'Check-in' : 'Scan';
return (
<div className="app">
@@ -73,7 +94,10 @@ function Shell() {
{t.id === 'scan' ? (
<span className="scan-btn">📷</span>
) : (
<span className="ico">{t.ico}</span>
<span className="ico">
{t.ico}
{t.id === 'connections' && pendingIncoming > 0 && <span className="dot" />}
</span>
)}
<span>{t.id === 'scan' ? scanLabel : t.label}</span>
</button>