feat(points): staff auto-connect never scores; event feedback pays +5
- Migration 20261020120000: staff (type staff / Admin / @appe.at) are auto-connected to every participant of the event via connections.auto rows inserted directly as accepted - never through accept_connection, so zero points by construction; backfill + idempotent helper + trigger. - Migration 20261020130000: submit_event_feedback awards +5 on the first submission per participant x event (edits earn 0), gated by _points_eligible; response gains earned column; ACL restored. - Admin: points move from Contacts to Registrations (active-event rows only, in-place save); Dashboard Top points drops emails; Dashboard and Activity hide auto connections. - Attendee: leaderboard masks surnames (Max M.); EventFeedback toast shows +5 pts on paid submissions. - Tests: staff_auto_connections_tests.sql (14 assertions), rpc_tests section 11 (4 assertions). Docs + release record 2026-10-20. - README: document the git-ignored .env provisioning step (missing key = white screen).
This commit is contained in:
1 parent
b7c2abb73b
commit
35b88d50ca
22 files changed
+809
-166
No files matched your search
@@ -332,12 +332,25 @@ Data: `getMyCheckins()` + `getTalkCohort()` + the agenda (via `useEvent()`).
|
||||
A **full-screen takeover** (no tab bar), opened from the Agenda session sheet.
|
||||
|
||||
- Shows the session (slot · time · room · title).
|
||||
- **1–5 star** rating + optional comment ("bonus points for details").
|
||||
- **1–5 star** rating + optional comment — **+5 pts** rating only, **+10 pts**
|
||||
rating + comment ("bonus points for details").
|
||||
- On submit: `submitFeedback(sessionId, rating, comment)` → a success toast
|
||||
("+N pts ⭐").
|
||||
|
||||
Data: `useEvent()` (session/slot) + `submitFeedback`.
|
||||
|
||||
## Event Feedback
|
||||
|
||||
A **full-screen takeover**, opened from Home ("Rate this event").
|
||||
|
||||
- **1–5 star** rating of the whole event + optional comment; one answer per
|
||||
participant (`event_feedback`, pre-filled via `getMyEventFeedback()` when
|
||||
already answered — re-submitting edits it).
|
||||
- **First submission earns +5 pts** (edits earn nothing; staff/Admin/@appe.at
|
||||
earn nothing) — toast "Thanks! +5 pts ⭐", plain thanks otherwise.
|
||||
|
||||
Data: `useEvent()` + `submitEventFeedback` / `getMyEventFeedback`.
|
||||
|
||||
## Leaderboard
|
||||
|
||||
The live leaderboard.
|
||||
@@ -345,6 +358,9 @@ The live leaderboard.
|
||||
- **Podium** for the top 3 (1st/2nd/3rd bars), then the rest as ranked rows.
|
||||
- **Staff are excluded** — only attendees appear (enforced in
|
||||
`get_leaderboard()` / `_sync_leaderboard`).
|
||||
- **Names are masked** — first name + the initial of the last name plus a dot
|
||||
(`Max Muster` → `Max M.`), on the podium and in the rows alike; surnames are
|
||||
never rendered (`maskedName()` in `Leaderboard.tsx`).
|
||||
- **Your row is highlighted** (`me`).
|
||||
- **Live:** subscribes to Realtime `postgres_changes` on the `leaderboard` table
|
||||
and re-fetches on any change — so it updates the moment points change anywhere.
|
||||
|
||||
Reference in new issue
Block a user