Add multi-day events (frontend), attendance register and certificates

Event wizard: one date or multiple sessions with a repeat-pattern builder,
and a new Attendance step (late joining and pricing, check-in window,
session reminders, certificates with preview). Public pages show the
schedule and late prices; the scanner picks today's session; new
attendance register page, My Certificates, and a public verify page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 14:53:39 +02:00
co-authored by Claude Opus 5.5
parent 623c85ccc5
commit f4b358e5c8
37 changed files with 1670 additions and 77 deletions
@@ -1,5 +1,5 @@
import React from "react";
import { Calendar, Ticket, CreditCard, HandHeart, Printer, CheckCircle2, ClipboardList, Clock, SquarePen, History, CheckSquare, Receipt, FileText, Users, ArrowRightLeft } from "lucide-react";
import { Calendar, Ticket, CreditCard, HandHeart, Printer, CheckCircle2, ClipboardList, Clock, SquarePen, History, CheckSquare, Receipt, FileText, Users, ArrowRightLeft, Award, CalendarDays } from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
@@ -60,6 +60,12 @@ export const dashboardUserHelpContent: HelpContent = {
<GuideItem icon={Printer} title="Print, email, or WhatsApp" tone="green">
Get your selected tickets onto your phone or paper before the event — as a printed page, an email, or a WhatsApp message.
</GuideItem>
<GuideItem icon={CalendarDays} title="Events with several sessions" tone="brand">
For a course or event that runs on several dates, your one ticket works for every session — bring the same QR code each time. The event page shows the full schedule.
</GuideItem>
<GuideItem icon={Award} title="Certificates" tone="amber">
If an event gives completion certificates, yours appears under My Certificates once it&apos;s issued — usually after the last session. Download it as a PDF; it has a code anyone can check.
</GuideItem>
<GuideItem icon={ArrowRightLeft} title="Transfer a ticket" tone="violet">
Can&apos;t make it? Tap &quot;Transfer&quot; to offer your ticket to someone else before the event. Type their name and email and/or phone number — there&apos;s no searching for people — and we send them a link to accept it. Until they accept, the ticket is still yours (you&apos;ll see &quot;Waiting for … to accept&quot;, and can cancel). Once they accept, they get their own ticket with a new QR code, and the old code (and any screenshots of it) stops working. For a ticket covering several people, one place moves to them. You stay responsible for the booking and payment. A ticket can&apos;t be transferred once it has been scanned.
</GuideItem>
@@ -25,6 +25,7 @@ import { supervisorCouponsHelpContent } from "./supervisor-coupons";
import { supervisorBundlesHelpContent } from "./supervisor-bundles";
import { supervisorConsentHelpContent } from "./supervisor-consent";
import { supervisorWaitlistHelpContent } from "./supervisor-waitlist";
import { supervisorAttendanceHelpContent } from "./supervisor-attendance";
import { supervisorOfflineScansHelpContent } from "./supervisor-offline-scans";
import { supervisorAllocationsHelpContent, staffMyGroupsHelpContent } from "./supervisor-allocations";
import { supervisorEmailAttendeesHelpContent } from "./supervisor-email-attendees";
@@ -173,6 +174,11 @@ const REGISTRY: HelpRegistryEntry[] = [
matches: pathname => pathname === "/dashboard/supervisor/waitlist",
content: supervisorWaitlistHelpContent,
},
{
slug: "supervisor-attendance",
matches: pathname => pathname === "/dashboard/supervisor/attendance",
content: supervisorAttendanceHelpContent,
},
{
slug: "supervisor-consent",
matches: pathname => pathname === "/dashboard/supervisor/consent",
@@ -1,5 +1,5 @@
import React from "react";
import { QrCode, Filter, CheckCircle2, ShieldAlert, WifiOff } from "lucide-react";
import { QrCode, Filter, CheckCircle2, ShieldAlert, WifiOff, CalendarDays } from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
@@ -22,6 +22,9 @@ export const staffTicketScanningHelpContent: HelpContent = {
<GuideItem icon={WifiOff} title="Offline mode" tone="amber">
Worried about the venue Wi-Fi? While you&apos;re online, pick the event and section and tap &quot;Enable offline mode&quot;. The section is locked to your device and its tickets are downloaded, so you can keep scanning with no connection. Scans sync automatically when you&apos;re back online. Tickets bought after the download won&apos;t be on your list — send those people to the door desk. Tap &quot;Release section&quot; when you&apos;re done. Tip: add this page to your home screen so it opens offline.
</GuideItem>
<GuideItem icon={CalendarDays} title="Multi-session events" tone="brand">
A ticket for an event with several sessions is checked in once per session. The scanner uses today&apos;s session automatically (pick another under &quot;Session&quot; if you need to). Scanning the same ticket again for the same session shows &quot;Already checked in for …&quot;. Depending on the event, check-in is open the whole day of a session or only around its start time. Offline mode downloads the list for today&apos;s session.
</GuideItem>
<GuideItem icon={ShieldAlert} title="Parental consent" tone="rose">
On youth events, the confirm screen warns when a parent hasn&apos;t given consent yet (or declined). That person can&apos;t be checked in; a supervisor can override, and the override is recorded in the audit log.
</GuideItem>
@@ -0,0 +1,61 @@
import React from "react";
import { ClipboardCheck, MousePointerClick, Filter, FileSpreadsheet, Award, Send, Ban, ShieldCheck } from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
/** Help content for /dashboard/supervisor/attendance. */
export const supervisorAttendanceHelpContent: HelpContent = {
title: "Attendance",
subtitle: "Who came to each session, and completion certificates.",
tabs: [
{
key: "register",
label: "The register",
icon: ClipboardCheck,
content: (
<div className="space-y-4">
<div className="space-y-4">
<GuideItem icon={ClipboardCheck} title="One row per person" tone="brand">
Every main ticket is a row, with a column for each session of a multi-day event (one &quot;Checked in&quot; column for a single-date event). A tick means they were scanned in for that session; a number is how many places of a group ticket were.
</GuideItem>
<GuideItem icon={MousePointerClick} title="Fixing a session" tone="green">
Supervisors can click a box to mark someone present (e.g. they were let in without a scan) or absent. Each change is recorded in the audit log. Closed events can&apos;t be changed.
</GuideItem>
<GuideItem icon={Filter} title="Finding people" tone="violet">
Search by name, email or phone. Filter to who completed, who didn&apos;t, or who missed the last two sessions — handy for a follow-up call.
</GuideItem>
<GuideItem icon={FileSpreadsheet} title="Export" tone="amber">
Download the register as Excel (with contact details) or a printable PDF. Cancelled sessions are left out.
</GuideItem>
</div>
</div>
),
},
{
key: "certificates",
label: "Certificates",
icon: Award,
content: (
<div className="space-y-4">
<div className="space-y-4">
<GuideItem icon={Award} title="Turning them on" tone="brand">
In the event wizard&apos;s Attendance step: pick one of four designs, the wording, who signs it, and who qualifies (every session, at least N sessions, or at least N%). They&apos;re issued automatically when the event ends.
</GuideItem>
<GuideItem icon={MousePointerClick} title="Issuing now" tone="green">
&quot;Issue now&quot; gives one to everyone who already qualifies. Use &quot;Issue anyway&quot; on a row to give one to someone who doesn&apos;t meet the rule.
</GuideItem>
<GuideItem icon={Send} title="Sending" tone="violet">
People can always download theirs from My Events. &quot;Send unsent&quot; emails or WhatsApps the ones not sent yet (as each person prefers); the event can also send them automatically.
</GuideItem>
<GuideItem icon={Ban} title="Revoking" tone="rose">
A revoked certificate stops showing as valid and is never issued again automatically. You can re-issue it by hand.
</GuideItem>
<GuideItem icon={ShieldCheck} title="Checking one" tone="amber">
Each certificate has a code and QR code. Anyone can check it at /certificates/verify/&lt;code&gt;, which shows only the name, event and dates.
</GuideItem>
</div>
</div>
),
},
],
};
@@ -1,5 +1,5 @@
import React from "react";
import { Calendar, ListChecks, Layers, FileText, Eye, Bell, Paperclip, Lock, MessageSquareHeart } from "lucide-react";
import { Calendar, ListChecks, Layers, FileText, Eye, Bell, Paperclip, Lock, MessageSquareHeart, CalendarDays, ClipboardCheck } from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
@@ -34,6 +34,9 @@ export const supervisorEventsHelpContent: HelpContent = {
<GuideItem icon={Calendar} title="Basic details" tone="brand">
Title, description, start/end times, registration deadline, go-live time, base price, picture, and a custom URL alias.
</GuideItem>
<GuideItem icon={CalendarDays} title="Multiple sessions" tone="brand">
Choose &quot;Multiple sessions&quot; for one event on several dates — e.g. every Wednesday 18:30–20:30 for 5 weeks. Use the repeat pattern to create the dates, then edit any of them, add a label (&quot;Week 1 — …&quot;), a different location, or an extra date. People register and pay once and get one ticket for every session. Cancel a session (e.g. a public holiday) rather than deleting it once people have been checked in. Registration closes when the first session starts unless you turn on late joining.
</GuideItem>
<GuideItem icon={ListChecks} title="Items & pricing" tone="green">
Ticket options and stock, variants of each option, and early-bird pricing tiers. An optional staff price is charged automatically to Staff and above when it&apos;s lower than the normal price.
</GuideItem>
@@ -55,6 +58,9 @@ export const supervisorEventsHelpContent: HelpContent = {
<GuideItem icon={MessageSquareHeart} title="Feedback" tone="violet">
Send a feedback form automatically after the event: pick when (e.g. the morning after) and whether it goes to everyone who checked in or everyone registered. Questions can be star ratings, multiple choice, yes/no or text. Answers can be anonymous. Anyone who hasn&apos;t answered gets one reminder 3 days later. Results are in Reports → Feedback summary. Rating and multiple-choice questions can also be used on the attendee form.
</GuideItem>
<GuideItem icon={ClipboardCheck} title="Attendance" tone="green">
For multi-session events: late joining (until which session, and a full, pro-rata or fixed late price for main tickets — pro-rata rounds to the nearest R10), the check-in window (the whole day of a session, or only from 2 hours before it until it ends), and reminders before each session. For any event: completion certificates — four designs, your wording and signature, and who qualifies. &quot;Preview certificate&quot; shows a sample.
</GuideItem>
</div>
<p className="text-xs text-gray-500">When creating a new event, later steps unlock as you complete the ones before them; editing an existing event lets you jump to any step freely.</p>
</div>