Type the reports page and turn lint back on in builds

ReportsV2 gets typed API responses (funnel, feedback summary, coupon
redemptions, cashup audit, consent) and derived rows. Master-order
quantities move into a per-row map, so an option name can no longer
overwrite a fixed column. Consent row types move to src/types. Removes
unused export helpers and state.

With the frontend now at zero lint errors and warnings, next build runs
ESLint again (eslint.ignoreDuringBuilds is gone).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 11:10:01 +02:00
co-authored by Claude Opus 5.5
parent 8360a78026
commit 6caf6794fb
4 changed files with 273 additions and 267 deletions
-3
View File
@@ -5,9 +5,6 @@ const nextConfig: NextConfig = {
images: {
domains: ['images.unsplash.com'],
},
eslint: {
ignoreDuringBuilds: true,
},
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
@@ -9,27 +9,8 @@ import { useDismissingState } from "@/hooks/useDismissingState";
import { ShieldCheck, Send, RefreshCw, HeartPulse, Printer } from "lucide-react";
import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from "@/components/ui/table";
import { errorMessage } from "@/lib/utils";
import type { Event } from "@/types";
import type { Event, ConsentRow, MedicalRow } from "@/types";
type ConsentRow = {
attendeeId: string;
name: string;
dateOfBirth: string | null;
minor: boolean;
parentName: string | null;
parentEmail: string | null;
parentPhone: string | null;
registrationStatus: string;
bookedBy: { name: string; email: string };
status: "not_required" | "missing" | "pending" | "given" | "declined";
request: { id: string; status: string; textVersion: number; signedName: string | null; respondedAt: string | null; lastSentAt: string; remindersSent: number; photoConsent: boolean | null; outdated: boolean } | null;
};
type MedicalRow = {
name: string; dateOfBirth: string | null; parentName: string | null; parentPhone: string | null; parentEmail: string | null;
medical: { allergies: string; medication: string; conditions: string; medicalAid: string } | null;
emergency: { name: string; phone: string; relationship: string } | null;
photoConsent: boolean | null; purged: boolean;
};
const STATUS_STYLE: Record<ConsentRow["status"], { label: string; cls: string }> = {
not_required: { label: "Not needed (18+)", cls: "bg-gray-100 text-gray-600" },
File diff suppressed because it is too large Load Diff
+27
View File
@@ -251,6 +251,8 @@ export type EventFinancials = {
effectiveGrossIncomeByMethod: Record<CashupMethod, number>;
effectiveTotalRevenue: number;
netProfit: number;
// Coupon discounts given on the event's registrations.
discountsTotal?: number;
unallocatedDonations: Payment[];
unallocatedDonationsTotal: number;
totalDonations: number;
@@ -273,6 +275,8 @@ export type RegistrationOption = {
tranches?: { id: string; quantity: number; priceSnapshot: number; appliedTierId?: string | null }[];
tickets?: { id: string; quantity?: number }[];
registration?: Registration;
// Tranche-aware total for the line, attached by registration list endpoints.
lineTotal?: number | null;
};
// A named person on a group registration, for one main-ticket place.
@@ -413,6 +417,29 @@ export type MessageSendResult<Recipient = { phone: string; name?: string }> = {
job?: { id: string };
};
// One person's parental-consent status on a youth event (GET /api/consent/events/:id).
export type ConsentRow = {
attendeeId: string;
name: string;
dateOfBirth: string | null;
minor: boolean;
parentName: string | null;
parentEmail: string | null;
parentPhone: string | null;
registrationStatus: string;
bookedBy: { name: string; email: string };
status: "not_required" | "missing" | "pending" | "given" | "declined";
request: { id: string; status: string; textVersion: number; signedName: string | null; respondedAt: string | null; lastSentAt: string; remindersSent: number; photoConsent: boolean | null; outdated: boolean } | null;
};
// One person's medical/emergency details (GET /api/consent/events/:id/medical).
export type MedicalRow = {
name: string; dateOfBirth: string | null; parentName: string | null; parentPhone: string | null; parentEmail: string | null;
medical: { allergies: string; medication: string; conditions: string; medicalAid: string } | null;
emergency: { name: string; phone: string; relationship: string } | null;
photoConsent: boolean | null; purged: boolean;
};
// A scanning section (e.g. "Main hall") and the ticket options valid at it.
export type Section = {
id: string;