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 5a3bfa1100
commit 7eb6f99e97
23 changed files with 4198 additions and 108 deletions
@@ -13,6 +13,7 @@ import { choosesSessions, isPickOption } from "@/lib/sessions";
import { SessionPicker } from "@/components/events/SessionPicker";
import { ModalOverlay } from "@/components/shared/ModalOverlay";
import { EventPicker } from "@/components/shared/EventPicker";
import { apiV2Data } from "@/lib/apiV2";
// ─── Types ────────────────────────────────────────────────────────────────────
type EarlyBirdTier = { deadline: string; price: number; order?: number; variantId?: string | null };
@@ -478,11 +479,10 @@ export default function SelfServicePage() {
payload.attendees = kioskNames;
payload.ticketDelivery = delivery;
}
const result = await apiFetch<Registration>("/api/registrations/manual", {
method: "POST",
body: payload,
const result = await (apiV2Data("post", "/registrations/manual", {
body: payload as never,
authToken: supervisorToken,
});
}) as Promise<Registration>);
setCurrentRegistrationId(result?.id || null);
setRegistrationIsFree(result?.status === "paid" || (result?.totalDueComputed ?? total) === 0);
@@ -539,8 +539,8 @@ export default function SelfServicePage() {
try {
const responses = collectedAnswers.map((answers) => ({ answers }));
await apiFetch(`/api/registrations/${currentRegistrationId}/forms/responses`, {
method: "POST",
await apiV2Data("post", "/registrations/{id}/form-responses", {
params: { id: currentRegistrationId },
body: { responses },
authToken: supervisorToken,
});