Post-event reporting + talk networking incentives

- Talk networking: per-event talk_networking_bonus awarded when two people
  who shared a checked-in talk accept a connection (accept_connection
  re-created, shared_talk flag, get_talk_cohort RPC, points_log category
  check widened); Convivo Networking sub-tab inside the Connect screen
  (Home quick action deep-links in; Connect button reflects existing
  connection state and is disabled for sent/connected/declined); admin
  Events view bonus input (0-10).
- Reports: sidecar POST /export (CSV / multi-sheet XLSX / PDF report via
  new pdfkit dep); APPE Admin Reports view (any event: on-screen summary,
  session feedback summary, top-5, CSV/Excel/PDF downloads); Activity
  session-feedback per-session aggregate header.
- Also carried: @appe.at admin trigger + default password, bulk contact
  delete, session level/area + event-level feedback, agenda level/area
  filters, admin password self-service, schedule level/area fields.
- 18/18 RPC tests; both apps build; exports verified end-to-end.

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-09-21 22:34:25 +02:00
1 parent f74db9dc26
commit 0b6d1f2b6f
35 files changed
+3973 -54

No files matched your search

+12 -1
View File
@@ -1,5 +1,6 @@
import { createContext, useContext, useEffect, useState, type ReactNode } from 'react';
import { supabase } from '../lib/supabase';
import { changeMyPassword } from '../lib/api';
import type { Contact } from '../lib/types';
interface AuthState {
@@ -8,6 +9,8 @@ interface AuthState {
/** Sign in with the admin's email + password (event-independent). */
signIn: (email: string, password: string) => Promise<void>;
signOut: () => Promise<void>;
/** Change the current admin's own login password (re-authenticates). */
changePassword: (newPassword: string) => Promise<void>;
}
const AuthContext = createContext<AuthState | null>(null);
@@ -100,8 +103,16 @@ export function AuthProvider({ children }: { children: ReactNode }) {
setContact(null);
}
async function changePassword(newPassword: string) {
if (!contact) throw new Error('Not signed in');
await changeMyPassword(contact.email, newPassword);
// Re-load the contact so the (now changed) password is reflected.
const c = await loadAdminContact(contact.email);
if (c) setContact(c);
}
return (
<AuthContext.Provider value={{ contact, loading, signIn, signOut }}>
<AuthContext.Provider value={{ contact, loading, signIn, signOut, changePassword }}>
{children}
</AuthContext.Provider>
);