feat(admin): per-row badge preview with unconfigured tooltip, Excel-style column filters and search in Contacts/Registrations
- New shared BadgeRender module (resolveText/resolveQr/BadgeElementBody/BadgePagePreview/fitScale) reused by the badge editor and the new read-only preview modal - Registrations: Badge button on every row opens a live preview of that attendee's badge; grayed out with a Uiverse-style APPE-red tooltip when the event has no badge configured - Contacts + Registrations: per-column multi-select filters (LinkedIn/Visibility/Admin; Type/Ticket/Checked in) with Excel-style live counts, plus general search (contacts: first/last/email; registrations: +type) - New Tooltip and ColumnFilter primitives in ui.tsx (portal-based, escape/outside-click close) - e2e: registration-badge-preview.spec.ts (13) + table-filters.spec.ts (13), all green; docs synced
This commit is contained in:
1 parent
6b277a2a67
commit
3d4dc207ff
10 files changed
+988
-121
No files matched your search
@@ -15,13 +15,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.) |
|
||||
| **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). |
|
||||
| **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). 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. |
|
||||
| **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. |
|
||||
| **Activity** | Tables of check-ins, connections, and feedback (per active event), 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, alignment and case transform; QR binds to the token / check-in URL / email / name / static. **Undo/redo**, 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). |
|
||||
| **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). |
|
||||
| **Settings** | Global LLM endpoint, model and optional API key for feedback summaries. |
|
||||
| **Events** | Create event, toggle active/inactive (a switch; only one can be active at a time — activating one deactivates the rest), edit dates/location + the **Sessionize endpoint** + the **Real-time clock** toggle (on = the attendee app uses the real system clock for Live/Next/Done; off = the simulated mid-event clock, the default). Each row has a **Sync** button that runs a (blocking) Sessionize sync and shows a result modal. |
|
||||
| **Interfaces** | Manages the Sessionize sync **sidecar**: status (online / running / last run), a **Run sync** control (event picker + blocking run + result modal), an **Import Excel** control (upload the Sessionize "Sessions and speakers (advanced)" `.xlsx` + a "How to get this file" tooltip), and a **Recent runs** table from `sync_runs`. See [../backend/sidecar.md](../backend/sidecar.md). |
|
||||
@@ -112,13 +112,14 @@ apps/admin/src/
|
||||
│ ├─ api.ts # typed wrapper: reads + writes (contacts, registrations, sponsors, schedule, points)
|
||||
│ └─ types.ts # TS types mirroring the DB
|
||||
├─ components/
|
||||
│ └─ ui.tsx # Avatar, Spinner, Empty, Modal, QrImage, TypeBadge, Toggle
|
||||
│ ├─ ui.tsx # Avatar, Spinner, Empty, Modal, QrImage, TypeBadge, Toggle, Tooltip, ColumnFilter
|
||||
│ └─ BadgeRender.tsx # shared badge renderer: resolveText/resolveQr, BadgeElementBody, BadgePagePreview, fitScale
|
||||
├─ screens/
|
||||
│ └─ Login.tsx # email-only magic-link login (admin-only)
|
||||
└─ views/
|
||||
├─ Dashboard.tsx # active event + aggregates + top points + activity
|
||||
├─ Contacts.tsx # table + edit / is_admin / visibility / points
|
||||
├─ Registrations.tsx# per-event list + type / QR token (view) / checked-in + sponsor lookup
|
||||
├─ Registrations.tsx# per-event list + type / QR token (view) / badge preview / checked-in + sponsor lookup
|
||||
├─ Sponsors.tsx # sponsor CRUD
|
||||
├─ Schedule.tsx # slots + sessions + speakers + material
|
||||
├─ Activity.tsx # check-ins / connections / feedback tables
|
||||
@@ -156,6 +157,29 @@ opens a modal with the scannable code. The token is **final** — it is generate
|
||||
per event and can't be reset from the UI (the `reset_registration_qr_token` RPC
|
||||
still exists, but the admin UI no longer exposes a reset action).
|
||||
|
||||
### Previewing a badge
|
||||
|
||||
Every registration row also has a **Badge** button. It opens a modal that renders
|
||||
the event's **badge layout** for that specific attendee — the same millimetre
|
||||
markup the Badges editor draws, minus the editing chrome — so the bound fields
|
||||
resolve against that row's own **name**, **ticket type**, **QR token**, plus the
|
||||
event's **name** and **company / organizer**. The event's layouts are loaded with
|
||||
the list (one request per event, reused by every preview); when an event has
|
||||
several layouts a **Layout** dropdown picks between them (the default is
|
||||
preselected), and the badge is scaled to fit the dialog on any viewport.
|
||||
|
||||
A badge counts as **configured** only when a layout for the event actually has
|
||||
elements — an empty layout would render a blank white badge. When nothing is
|
||||
configured, the **Badge** button is still shown on every row but **disabled**
|
||||
(grayed out, not clickable), and hovering or focusing it reveals a tooltip —
|
||||
*“A badge needs to be configured for this event first. Design one in the Badges
|
||||
view.”* — pointing the admin to the **Badges** view. The tooltip is the shared
|
||||
`Tooltip` component in `components/ui.tsx`: the Uiverse dark-glass card already
|
||||
used in Interfaces, re-themed to the APPE red accent and rendered through a
|
||||
portal so it is never clipped by the table's `overflow: hidden`. The shared badge
|
||||
renderer lives in `components/BadgeRender.tsx`, used by both the editor and this
|
||||
preview.
|
||||
|
||||
### Sponsor lookup (in-place)
|
||||
|
||||
Setting a registration's type to **Sponsor** requires a sponsor lookup. If none
|
||||
|
||||
Reference in new issue
Block a user