Staff exclusions + contact-password auth sync
- contacts.password now auto-syncs to auth.users.encrypted_password via trg_contact_password_sync, so setting a password on the contact row in the Supabase UI makes it work with signInWithPassword immediately (fixes staff like Bruno not being able to log in with a UI-set password). One-time reconciliation in the migration. - Staff excluded from the leaderboard: _sync_leaderboard skips/removes staff rows, get_leaderboard() filters type='staff', seed no longer inserts staff. Affects the attendee Leaderboard and the admin Dashboard 'Top points'. - Home/Agenda/Profile identical for all roles: Home quick-action always 'Scan & connect' (no 'Check-in' relabel), footer role badge removed, tab label always 'Scan' (staff keep check-in via the Scan screen mode toggle). - Profile: removed the duplicate Staff pill (type pill already shows Staff). - Agenda session sheet: 'Download material' moved to the bottom of the button stack with spacing. - Docs updated (schema, rpcs, seed, screens, architecture, next-steps). 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
0221b1a8c0
commit
5886de9d19
12 files changed
+203
-45
No files matched your search
+18
-11
@@ -11,7 +11,7 @@ from `useAuth()` (`contact` + `registration`).
|
||||
| Login | `Login.tsx` | shown when not authenticated |
|
||||
| Home | `Home.tsx` | tab (default) |
|
||||
| Agenda | `Agenda.tsx` | tab |
|
||||
| Scan / Check-in | `Scan.tsx` | tab (role-aware label) |
|
||||
| Scan | `Scan.tsx` | tab (staff get an Attendee/Staff mode toggle inside) |
|
||||
| Connections | `Connections.tsx` | tab |
|
||||
| Profile | `Profile.tsx` | tab |
|
||||
| Leaderboard | `Leaderboard.tsx` | from Home (points pill / quick action) |
|
||||
@@ -45,12 +45,14 @@ The landing screen. Shows:
|
||||
- **Next card** — the pick for the next slot.
|
||||
- **My picks today** — shows only **2 rows** (the current slot's pick + the next
|
||||
slot's pick). "tap to change" is a **hyperlink** to the Agenda.
|
||||
- **Footer type badge** — the registration-type pill is shown **only for non-
|
||||
attendee** types (Attendee is the default and is not shown at the bottom).
|
||||
- **Quick actions** — Scan & connect / Check-in, Agenda, Connections, Leaderboard.
|
||||
- **Quick actions** — Scan & connect, Agenda, Connections, Leaderboard.
|
||||
- **No active event** — a graceful empty state ("No active event right now.
|
||||
Check back soon!").
|
||||
|
||||
> **Identical for every role.** The Home screen (and the tab bar) is the same for
|
||||
> attendees and staff — no role badge, no "Check-in" relabel. Staff keep their
|
||||
> check-in capability inside the **Scan** screen (Attendee/Staff mode toggle).
|
||||
|
||||
Data: `useEvent()` (event + agenda + clock) + `getMyPreferences()` +
|
||||
`getMyCheckins(email)`. Slot status comes from `slotStatus(slot, now)`
|
||||
([app-structure.md#the-event-clock](./app-structure.md#the-event-clock)).
|
||||
@@ -71,8 +73,9 @@ user speaks shows a **"🎤 you"** tag; a session with material shows a **📎**
|
||||
is uploaded yet, a **non-dismissible** "📎 Upload your session material" notice
|
||||
with a file input. Uploading stores the file in the `materials` bucket and
|
||||
calls `set_session_material` (via `uploadSessionMaterial`). Once uploaded, the
|
||||
notice is gone and a **📎 Download material** link appears (visible to **all**
|
||||
attendees).
|
||||
notice is gone and a **📎 Download material** button appears (visible to **all**
|
||||
attendees), pinned to the **bottom** of the sheet's button stack (below
|
||||
"Pick this session").
|
||||
- Picking is "one per slot" — picking a new session in a slot replaces the old
|
||||
pick (enforced by the `set_preference` RPC).
|
||||
|
||||
@@ -81,9 +84,10 @@ Data: `useEvent()` + `getMyPreferences()` + `getMyCheckins(email)` +
|
||||
|
||||
## Scan / Check-in
|
||||
|
||||
One screen, two modes (segmented control: **Attendee / Staff**). The default mode
|
||||
and the tab label are role-aware: staff (`contact.is_admin`) default to **Staff**
|
||||
mode and the tab reads **Check-in**.
|
||||
One screen, two modes (segmented control: **Attendee / Staff**). The tab label is
|
||||
always **"Scan"** (the home page is identical for every role); the **default mode**
|
||||
is role-aware — staff (`contact.is_admin`) default to **Staff** mode, attendees to
|
||||
**Attendee** mode.
|
||||
|
||||
- **Attendee mode (connect):** scan a peer's lanyard → `lanyardLookup` → a
|
||||
"Connect with {name}?" sheet (with the peer's registration-type badge + LinkedIn
|
||||
@@ -136,6 +140,8 @@ Data: `useEvent()` (session/slot) + `submitFeedback`.
|
||||
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`).
|
||||
- **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.
|
||||
@@ -154,8 +160,9 @@ event). The `leaderboard` table is kept in sync transactionally by the RPCs —
|
||||
|
||||
## Profile
|
||||
|
||||
- **Header** — avatar, name, email, registration-type pill, a **staff** pill when
|
||||
`contact.is_admin`, and a points pill.
|
||||
- **Header** — avatar, name, email, registration-type pill, a **staff** pill
|
||||
(only when `contact.is_admin` **and** the type isn't already `staff`, so it
|
||||
never shows twice), and a points pill.
|
||||
- **My QR code** — renders `registration.qr_token` (the token lives on the
|
||||
registration, per event) as a scannable QR (`QrImage`). "Show this to staff for
|
||||
check-in and to peers to connect."
|
||||
|
||||
Reference in new issue
Block a user