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). 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:
1 parent
e243b83a56
commit
3ee91b5ad6
22 files changed
+809
-166
No files matched your search
@@ -14,13 +14,13 @@ It runs on **port 3001** (Vite dev) or as the `convivo-admin` Docker container
|
||||
|
||||
| View | Purpose |
|
||||
|---|---|
|
||||
| **Dashboard** | Active event card (name, dates, location, aggregates: avg feedback, #sessions, #speakers, #registrations, #checked-in) + top points + recent activity. |
|
||||
| **Contacts** | Table of all contacts (email, name, LinkedIn, visibility toggles, `is_admin`). Edit, toggle `is_admin`, set visibility, adjust points. (No QR token here — it lives on the registration.) A general search matches **first name, last name or email address**; the **LinkedIn**, **Visibility** and **Admin** columns each have an Excel-style **multi-select filter** with live counts. |
|
||||
| **Registrations** | Per active event: list (contact, type, **QR token**, checked_in, points). Change type (enforces the sponsor rule — a failed sponsor change opens an **in-place sponsor lookup** popup), mark checked-in, **view the QR token** (final — no reset), and **preview the attendee's badge** (renders the event's badge layout with that row's own name / ticket type / QR token / company), plus a **Print** button that queues the badge on the print station ([../backend/printing.md](../backend/printing.md)). When the event has **no badge configured**, the Badge button stays visible but **grayed out**, and hovering it shows a tooltip explaining a badge must be designed first. A general search matches **first name, last name, email address or type**; the **Type**, **QR token** (ticket) and **Checked in** columns each have an Excel-style **multi-select filter** with live counts. The **checked-in toggle is per-row and optimistic**: it patches that one row (and its points) in place — **no list reload**, so rows never jump or vanish mid-edit (the list is sorted by points) — while a small "Saving…" pulse marks the busy row and only that checkbox is disabled; other rows stay live and a second row can be toggled concurrently. A rejected write rolls the row back to the server's values. Changing the type behaves the same way. The toggle is what grants front-desk eligibility from the console (see [../backend/rpcs.md](../backend/rpcs.md)). |
|
||||
| **Dashboard** | Active event card (name, dates, location, aggregates: avg feedback, #sessions, #speakers, #registrations, #checked-in) + top points (**name only** — no email addresses are shown) + recent activity (staff auto-pairings are background bookkeeping, not activity, and never appear here). |
|
||||
| **Contacts** | Table of all contacts (email, name, LinkedIn, visibility toggles, `is_admin`). Edit, toggle `is_admin`, set visibility. **Points are no longer managed here** — the value lives on the pass, so the adjustment moved to the **Registrations** row that owns it. (No QR token here — it lives on the registration.) A general search matches **first name, last name or email address**; the **LinkedIn**, **Visibility** and **Admin** columns each have an Excel-style **multi-select filter** with live counts. |
|
||||
| **Registrations** | Per active event: list (contact, type, **QR token**, checked_in, points). Change type (enforces the sponsor rule — a failed sponsor change opens an **in-place sponsor lookup** popup), mark checked-in, **view the QR token** (final — no reset), and **preview the attendee's badge** (renders the event's badge layout with that row's own name / ticket type / QR token / company), plus a **Print** button that queues the badge on the print station ([../backend/printing.md](../backend/printing.md)). When the event has **no badge configured**, the Badge button stays visible but **grayed out**, and hovering it shows a tooltip explaining a badge must be designed first. A general search matches **first name, last name, email address or type**; the **Type**, **QR token** (ticket) and **Checked in** columns each have an Excel-style **multi-select filter** with live counts. The **checked-in toggle is per-row and optimistic**: it patches that one row (and its points) in place — **no list reload**, so rows never jump or vanish mid-edit (the list is sorted by points) — while a small "Saving…" pulse marks the busy row and only that checkbox is disabled; other rows stay live and a second row can be toggled concurrently. A rejected write rolls the row back to the server's values. Changing the type behaves the same way. The toggle is what grants front-desk eligibility from the console (see [../backend/rpcs.md](../backend/rpcs.md)). Points moved here from Contacts: each point-earning row of the **active** event carries a **Points** button (`adjust_points` always targets the active event's pass, so on other events the button is disabled with an explanatory tooltip), opening a modal that applies the delta, patches the row in place — no reload, no reordering — and lets the silent refresher settle the truth. Rows excluded from points (the `_points_eligible` mirror: type staff, Admin contact, `@appe.at`) show the "no points" marker and no button. |
|
||||
| **Sponsors** | List (paid only visible to attendees; admin sees all). Add/edit (type, name, email, phone, paid, amount, **contact search-and-pick**). |
|
||||
| **Schedule** | Slots (with a **type optionset** — `Session` / `Service Session`) + sessions (with speakers 1:N via a **multi-select search dropdown**, material upload with a **submitted / not submitted** state and `average_feedback`), plus an admin-only **Delete current schedule** action for the active event. |
|
||||
| **Sessions** | Everything about the **active event's sessions** in one place (nav sits between Schedule and Activity): one row per session with its slot date/time, room / level / area, **speakers**, **check-in count** (with capacity when set), **average rating and response count**, and whether an AI summary is stored, **out of date**, or impossible. Click a row to expand it: description, the full **speaker list**, the **roster of who checked in** (with time and which staff member scanned them), and the stored **AI summary**. A **search** box matches title, room, level, area or speaker, and the **attendee filter** answers "which sessions did this person actually attend?" — the list narrows to those sessions, the header states the count, and the expanded roster highlights that person. **Generate AI Feedback Summary** (see below) summarises every session with feedback in one click. Data comes from `sessions` ⨝ `slots` ⨝ `session_speakers` ⨝ `checkins` ⨝ `feedback`, joined in the client so the numbers match the other views exactly and no new RLS policy is needed. |
|
||||
| **Activity** | Tables of check-ins, connections, and feedback (per active event), with manual **Generate AI Summary** controls for the event and individual sessions. |
|
||||
| **Activity** | Tables of check-ins, connections, and feedback (per active event; staff auto-pairings — `connections.auto` — are hidden here too), with manual **Generate AI Summary** controls for the event and individual sessions. |
|
||||
| **Raffle** | Draws eligible attendees one at a time for the active event. Configure the number of picks (default 5), then **Spin** a roulette that decelerates onto a server-chosen winner; repeat until the pick count is reached. Excludes staff/Admin and the leaderboard top 3, and no one can win twice in a run. **New run** clears the current winners. See [../backend/rpcs.md#raffle](../backend/rpcs.md#raffle). |
|
||||
| **Badges** | A **per-event WYSIWYG badge / PDF layout editor** (modelled on pretix's PDF Editor). Pick the event, then design one or more named **layouts** (a **Default** per event, switchable / creatable / deletable). Add **text boxes**, **QR codes** and **images** to a millimetre canvas; drag to move, use the 8 resize handles + rotation handle, **Shift-click to multi-select**, and **press `Del`** to remove. While dragging, **PowerPoint-style smart guides** appear — dashed alignment lines (edges / centres, page and neighbouring items) plus equal-spacing lines — and the element **snaps** to them. A **Word-style align** toolbar (left / center / right, top / middle / bottom) plus **PowerPoint-style** object alignment — align to the **page** or to the **selection**, and **distribute** horizontally / vertically — with the same controls in the properties panel. Text binds to attendee fields (name, email, ticket type, QR token, event name, **company / organizer**, or static) with font, size, line-height, colour, bold/italic, a labelled **Align text in box** section (horizontal left / center / right and vertical top / middle / bottom, inside the element's own frame) and case transform; QR binds to the token / check-in URL / email / name / static. **Undo/redo** (`Ctrl`+`Z` / `Ctrl`+`Y`, also `Ctrl`+`Shift`+`Z`), a **Preview** mode (no handles), a **JSON** view of the layout, and **Save**. Previewed against a real sample registration. See [../backend/rpcs.md#badge-editor](../backend/rpcs.md#badge-editor). |
|
||||
| **Printing** | Badge-print control center: printer stations (add / inline **rename** / **revoke**, the `cvp_…` token shown **once** on creation), live station cards with state + staff hints, queue counters (pending / in flight / dead letters / completed), the last completed jobs with **Reprint**, and dead letters with **Requeue** / **Discard**. Backed by `get_print_overview` (polled every 5 s) — see [../backend/printing.md](../backend/printing.md). |
|
||||
|
||||
@@ -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