Fix: door and manual registrations get their tickets; admin Corrections (1.52.0)

On events with a required attendee form, tickets waited for the forms, but
At the door and Manual registration never asked for them: payment was
recorded and nobody could be checked in.

- The form pops up at the door and in Manual registration; "Fill in later"
  (any staff) issues the tickets once paid and sends the payer a link
  (Registration.formWaivedAt, POST /api/v2/registrations/{id}/form-later).
- One form per person on picked-session bookings; a required form with no
  questions no longer holds tickets back; every caller asks the ticket
  generator (formsOutstanding).
- Kiosk asks for the forms the server says are missing; headings show as text.
- Admin Corrections page and /api/v2/corrections: issue missing tickets,
  pay later (ticketsReleasedAt), make it free (complimentaryDiscount),
  check in or undo after the event.
- Migration 20261102120000_corrections; unit and e2e tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-02 12:01:10 +02:00
co-authored by Claude Opus 5.5
parent 838a6b3c3d
commit db214a1013
43 changed files with 3940 additions and 95 deletions
@@ -0,0 +1,47 @@
import React from "react";
import { Wrench, Ticket, FileText, Gift, CheckSquare, History } from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
/** Help content for /dashboard/admin/corrections. */
export const adminCorrectionsHelpContent: HelpContent = {
title: "Corrections",
subtitle: "Put registrations right after the fact — admins only.",
tabs: [
{
key: "fix",
label: "What you can fix",
icon: Wrench,
content: (
<div className="space-y-4">
<GuideItem icon={Ticket} title="Missing tickets" tone="rose">
A paid registration without all its tickets — usually because a required attendee form was never filled in. &quot;Issue all missing tickets&quot; fixes every one at the event at once and leaves the forms for later. Tick &quot;Send them&quot; to email/WhatsApp the tickets (leave it off after the event).
</GuideItem>
<GuideItem icon={FileText} title="Attendee forms" tone="amber">
Fill in the form for someone, or issue their tickets with the form left for later.
</GuideItem>
<GuideItem icon={Ticket} title="Issue tickets — pay later" tone="brand">
Tickets for a registration that isn&apos;t paid yet. The balance is still owed and shows as outstanding until it&apos;s paid.
</GuideItem>
<GuideItem icon={Gift} title="Make it free" tone="green">
Writes off what&apos;s still owed as a complimentary discount — your income stays what was really paid — and issues the tickets. Not on a closed (cashed-up) event.
</GuideItem>
<GuideItem icon={CheckSquare} title="Check in after the event" tone="violet">
Check a ticket in (or undo it) for any session, after the event is over or closed. It counts as a manual check-in and no message is sent.
</GuideItem>
</div>
),
},
{
key: "log",
label: "Good to know",
icon: History,
content: (
<div className="space-y-4">
<p>Every correction is in the Audit log with who did it and the reason you give.</p>
<p>&quot;Needs attention&quot; lists registrations missing tickets, with forms still to fill in, or owing money without tickets. Past and closed events are in the event list too.</p>
</div>
),
},
],
};
@@ -18,6 +18,7 @@ import { dashboardAdminCashupHelpContent, dashboardAdminCashupDetailHelpContent
import { supervisorEventsHelpContent } from "./supervisor-events";
import { supervisorEventOptionsHelpContent } from "./supervisor-event-options";
import { supervisorManualHelpContent, supervisorManualRegistrationLegacyHelpContent } from "./supervisor-manual";
import { adminCorrectionsHelpContent } from "./admin-corrections";
import { supervisorAtTheDoorHelpContent } from "./supervisor-at-the-door";
import { supervisorPaymentsHelpContent } from "./supervisor-payments";
import { supervisorFormsHelpContent } from "./supervisor-forms";
@@ -233,6 +234,11 @@ const REGISTRY: HelpRegistryEntry[] = [
matches: pathname => pathname === "/dashboard/admin/privacy",
content: adminPrivacyHelpContent,
},
{
slug: "admin-corrections",
matches: pathname => pathname === "/dashboard/admin/corrections",
content: adminCorrectionsHelpContent,
},
{
slug: "admin-data-requests",
matches: pathname => pathname === "/dashboard/admin/data-requests",
@@ -41,6 +41,7 @@ export const supervisorAtTheDoorHelpContent: HelpContent = {
content: (
<div className="space-y-4">
<p>Selecting a registration automatically jumps to Payment mode if it&apos;s unpaid, or Check-in mode if it&apos;s already fully paid.</p>
<p>If the event has a required attendee form that hasn&apos;t been filled in, it pops up when you register someone, select them or take their payment — the tickets wait for it. Fill it in with them, or choose <strong>Fill in later</strong>: the tickets are issued as soon as it&apos;s paid and they&apos;re sent a link to fill in the form. Closing the popup counts as Fill in later.</p>
<p>When editing an existing registration&apos;s items, quantities can&apos;t be reduced below what&apos;s already been printed or paid for.</p>
<p>The item picker has a &quot;Have a code?&quot; field for discount codes. On an existing registration the code is applied when you save.</p>
<p>On events where people pick sessions, tick the sessions under a per-session ticket. For a new attendee, a place in today&apos;s session is selected for you when there&apos;s room. Sessions already booked on a registration can&apos;t be changed when editing it — book extra sessions as a new registration.</p>
@@ -15,6 +15,7 @@ export const supervisorManualHelpContent: HelpContent = {
content: (
<div className="space-y-4">
<p>Pick an event, then either search for an existing user or enter guest details (name, and at least one of email or phone). Choose ticket options and quantities — early-bird and staff pricing are applied automatically, and a discount code can be added under &quot;Have a code?&quot; — then create the registration. On events that take names, tick &quot;Registering for other people?&quot; to name each person. A new guest account is created inactive, and an activation link is sent immediately (by email if provided, otherwise WhatsApp) so they can set their own password.</p>
<p>If the event has a required attendee form, it pops up after you create the registration (and after a payment, if it&apos;s still outstanding). Fill it in now, or choose <strong>Fill in later</strong> — the tickets are issued once it&apos;s paid and the attendee is sent a link to the form.</p>
<p className="text-xs text-gray-500">After creating a registration, the Record Payment tab is pre-filled with it — switch tabs to take payment right away.</p>
</div>
),