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
File diff suppressed because it is too large Load Diff
+710
View File
@@ -3570,6 +3570,138 @@ export interface paths {
patch: operations["patchAllocation-groupsId"];
trace?: never;
};
"/corrections/events/{id}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* An event's registrations, with what needs putting right
* @description Every registration that isn't cancelled — closed and past events too — with its balance, forms still to fill in, tickets and check-ins.
*
* **Who:** Admins only.
*/
get: operations["getCorrectionsEventsId"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/corrections/events/{id}/issue-missing": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Issue every missing ticket at an event
* @description For each paid registration (or one released unpaid) without all its tickets. Attendee forms still outstanding are left for later.
*
* **Who:** Admins only.
*/
post: operations["postCorrectionsEventsIdIssue-missing"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/corrections/registrations/{id}/tickets": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Issue a registration's tickets now
* @description `skipForm` leaves the attendee form for later; `payLater` issues them before it's paid (the balance is still owed).
*
* **Who:** Admins only.
*/
post: operations["postCorrectionsRegistrationsIdTickets"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/corrections/registrations/{id}/complimentary": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Make it free
* @description What's still owed is written off as a complimentary discount (income stays what was really paid), it's marked paid and its tickets are issued. Not on a closed event.
*
* **Who:** Admins only.
*/
post: operations["postCorrectionsRegistrationsIdComplimentary"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/corrections/tickets/{id}/check-in": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Check a ticket in (or undo it) after the fact
* @description Any time — after the event or session, or once the event is closed. `present: false` undoes the check-in for that session. Recorded as a manual check-in; no message is sent.
*
* **Who:** Admins only.
*/
post: operations["postCorrectionsTicketsIdCheck-in"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/registrations/{id}/form-later": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Fill in the attendee form later
* @description At the door: the tickets stop waiting for the required attendee form (issued now if it's paid) and the payer is sent a link to fill it in (`notify: false` to not).
*
* **Who:** Staff, supervisors and admins.
*/
post: operations["postRegistrationsIdForm-later"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/me/family": {
parameters: {
query?: never;
@@ -19582,6 +19714,584 @@ export interface operations {
};
};
};
getCorrectionsEventsId: {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
event: {
id: string;
title: string;
startDate: unknown;
endDate: unknown;
closed: boolean;
formRequired: boolean;
sessions: {
id: string;
label: string;
startsAt: unknown;
}[];
};
registrations: {
id: string;
status: string;
createdAt: unknown;
user: {
id: string;
name: string;
email: string | null;
phoneNumber: string | null;
};
totalDue: number;
paid: number;
balance: number;
/** @description Places booked (every line) */
places: number;
/** @description Places with a ticket */
ticketPlaces: number;
/** @description Paid (or released unpaid) but not every place has a ticket */
missingTickets: boolean;
/** @description Attendee forms still holding the tickets back */
formsNeeded: number;
/** @description The form was left for later */
formWaived: boolean;
/** @description Tickets issued before it was paid */
ticketsReleased: boolean;
/** @description Balance written off */
complimentary: number;
tickets: {
id: string;
qrCode: string;
/** @description Ticket option, variant and (a picked session) the session */
label: string;
isMainTicket: boolean;
/** @description Who it's for */
name: string;
quantity: number;
/** @description The sessions it covers (`event` on a single-date event) */
sessionIds: string[];
/** @description People checked in, per session */
checkedIn: {
[key: string]: number;
};
}[];
}[];
};
};
};
};
/** @description Validation failed (VALIDATION_FAILED) */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not signed in (UNAUTHENTICATED) */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not allowed for this role (FORBIDDEN) */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not found (NOT_FOUND) */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
"postCorrectionsEventsIdIssue-missing": {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": {
/** @description Send the new tickets to the attendee (off by default) */
send?: boolean;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
registrations: number;
tickets: number;
failed: {
id: string;
name: string;
message: string;
}[];
};
};
};
};
/** @description Validation failed (VALIDATION_FAILED) */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not signed in (UNAUTHENTICATED) */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not allowed for this role (FORBIDDEN) */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not found (NOT_FOUND) */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
postCorrectionsRegistrationsIdTickets: {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": {
skipForm?: boolean;
payLater?: boolean;
/** @description Send the new tickets to the attendee (off by default) */
send?: boolean;
/** @description Why — kept in the audit log */
reason?: string | null;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
ticketsIssued: number;
registration: {
id: string;
status: string;
createdAt: unknown;
user: {
id: string;
name: string;
email: string | null;
phoneNumber: string | null;
};
totalDue: number;
paid: number;
balance: number;
/** @description Places booked (every line) */
places: number;
/** @description Places with a ticket */
ticketPlaces: number;
/** @description Paid (or released unpaid) but not every place has a ticket */
missingTickets: boolean;
/** @description Attendee forms still holding the tickets back */
formsNeeded: number;
/** @description The form was left for later */
formWaived: boolean;
/** @description Tickets issued before it was paid */
ticketsReleased: boolean;
/** @description Balance written off */
complimentary: number;
tickets: {
id: string;
qrCode: string;
/** @description Ticket option, variant and (a picked session) the session */
label: string;
isMainTicket: boolean;
/** @description Who it's for */
name: string;
quantity: number;
/** @description The sessions it covers (`event` on a single-date event) */
sessionIds: string[];
/** @description People checked in, per session */
checkedIn: {
[key: string]: number;
};
}[];
};
};
};
};
};
/** @description Validation failed (VALIDATION_FAILED) */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not signed in (UNAUTHENTICATED) */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not allowed for this role (FORBIDDEN) */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not found (NOT_FOUND) */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
postCorrectionsRegistrationsIdComplimentary: {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": {
skipForm?: boolean;
/** @description Send the new tickets to the attendee (off by default) */
send?: boolean;
/** @description Why — kept in the audit log */
reason?: string | null;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
amount: number;
ticketsIssued: number;
registration: {
id: string;
status: string;
createdAt: unknown;
user: {
id: string;
name: string;
email: string | null;
phoneNumber: string | null;
};
totalDue: number;
paid: number;
balance: number;
/** @description Places booked (every line) */
places: number;
/** @description Places with a ticket */
ticketPlaces: number;
/** @description Paid (or released unpaid) but not every place has a ticket */
missingTickets: boolean;
/** @description Attendee forms still holding the tickets back */
formsNeeded: number;
/** @description The form was left for later */
formWaived: boolean;
/** @description Tickets issued before it was paid */
ticketsReleased: boolean;
/** @description Balance written off */
complimentary: number;
tickets: {
id: string;
qrCode: string;
/** @description Ticket option, variant and (a picked session) the session */
label: string;
isMainTicket: boolean;
/** @description Who it's for */
name: string;
quantity: number;
/** @description The sessions it covers (`event` on a single-date event) */
sessionIds: string[];
/** @description People checked in, per session */
checkedIn: {
[key: string]: number;
};
}[];
};
};
};
};
};
/** @description Validation failed (VALIDATION_FAILED) */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not signed in (UNAUTHENTICATED) */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not allowed for this role (FORBIDDEN) */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not found (NOT_FOUND) */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
"postCorrectionsTicketsIdCheck-in": {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": {
/** @description Multi-day events: the session */
sessionId?: string | null;
/** @description How many (default: everyone left on the ticket) */
people?: number | null;
/** @description false undoes it */
present?: boolean;
/** @description Why — kept in the audit log */
reason?: string | null;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
checkedIn: number;
quantity: number;
};
};
};
};
/** @description Validation failed (VALIDATION_FAILED) */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not signed in (UNAUTHENTICATED) */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not allowed for this role (FORBIDDEN) */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not found (NOT_FOUND) */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
"postRegistrationsIdForm-later": {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": {
notify?: boolean;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
ticketsIssued: number;
sentTo: string[];
};
};
};
};
/** @description Validation failed (VALIDATION_FAILED) */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not signed in (UNAUTHENTICATED) */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not allowed for this role (FORBIDDEN) */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not found (NOT_FOUND) */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
getMeFamily: {
parameters: {
query?: never;