WIP 1.51.10: registration management on v2 (routes, frontend)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
This commit is contained in:
2026-10-29 13:04:31 +02:00
co-authored by Claude Opus 5.5
parent 4b7fb19f37
commit da67f80d6a
23 changed files with 4198 additions and 108 deletions
@@ -6,6 +6,7 @@ import { apiFetch } from "@/lib/api";
import { isMinorOn } from "@/components/shared/AttendeeNamesEditor";
import { errorMessage } from "@/lib/utils";
import type { Attendee } from "@/types";
import { apiV2Data } from "@/lib/apiV2";
const CONSENT_LABEL: Record<string, { text: string; cls: string }> = {
pending: { text: "consent pending", cls: "text-amber-700" },
@@ -95,8 +96,8 @@ export function AttendeesPanel({ registration, token, canEdit, hasForm, onSaved,
setBusy(true);
setError(null);
try {
await apiFetch(`/api/registrations/${encodeURIComponent(registration.id)}/attendees`, {
method: "PUT",
await apiV2Data("put", "/registrations/{id}/attendees", {
params: { id: registration.id },
authToken: token,
body: {
ticketDelivery: delivery,
@@ -127,7 +128,7 @@ export function AttendeesPanel({ registration, token, canEdit, hasForm, onSaved,
const sendLink = async (a: Attendee) => {
try {
const res = await apiFetch<{ message: string }>(`/api/registrations/${encodeURIComponent(registration.id)}/attendees/${encodeURIComponent(a.id)}/send-form-link`, { method: "POST", authToken: token });
const res = await (apiV2Data("post", "/registrations/{id}/attendees/{attendeeId}/form-link", { params: { id: registration.id, attendeeId: a.id }, authToken: token }) as Promise<{ message: string }>);
onMessage(res.message);
} catch (e) {
setError(errorMessage(e) || "Couldn't send the form link");