feat: simplify registration to event ticket only

Remove food and accommodation packages from payment page, keeping only
early bird ticket pricing (€80/€120/€150 tiers).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2025-12-21 23:12:16 -05:00
parent 2cf3056735
commit cbbb6fee1d
1 changed files with 15 additions and 76 deletions

View File

@ -24,20 +24,7 @@ export default function RegisterPage() {
dietaryOther: "",
crewConsent: "",
})
const [packages, setPackages] = useState({
accommodation: false,
food: false,
})
const baseTicketPrice = 80 // Updated to early bird price €80
const accommodationPrice = 39.2 * 6 // Updated to €39.20/night * 6 nights = €235.20
const foodPrice = 35 * 3 + 10 * 3 // Updated to reflect catered (€35*3) + self-organized (€10*3) = €135
const calculateTotal = () => {
let total = baseTicketPrice
if (packages.accommodation) total += accommodationPrice
if (packages.food) total += foodPrice
return total
}
const baseTicketPrice = 80 // Early bird price €80
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault()
@ -77,87 +64,40 @@ export default function RegisterPage() {
<main className="container mx-auto px-4 py-12 max-w-5xl">
<div className="text-center mb-12">
<h1 className="text-4xl md:text-5xl font-bold mb-4">Complete Your Registration</h1>
<p className="text-xl text-muted-foreground">Select packages and payment method</p>
<p className="text-xl text-muted-foreground">Choose your payment method</p>
</div>
<Card className="mb-8 border-primary/40">
<CardHeader>
<CardTitle>Select Your Packages</CardTitle>
<CardTitle>Event Registration</CardTitle>
<CardDescription>
Ticket is required (80 early bird until Dec 31, 2025). Add accommodation and food as needed.
Early bird pricing available until Dec 31, 2025
</CardDescription>
</CardHeader>
<CardContent>
<div className="space-y-4">
{/* Ticket (required) */}
{/* Ticket */}
<div className="flex items-start justify-between py-4 border-b border-border">
<div className="flex items-start gap-3">
<Checkbox checked disabled className="mt-1" />
<div>
<div className="font-medium">CCG 2026 Ticket (Required)</div>
<div className="text-sm text-muted-foreground">
80 Early bird (until Dec 31, 2025) 120 Regular (Jan-Jun 2026) 150 Late (after Jul 1,
2026)
</div>
<div className="text-xs text-muted-foreground mt-1">
CCA members: Bring two newcomers, get a free ticket!
</div>
<div>
<div className="font-medium">CCG 2026 Ticket</div>
<div className="text-sm text-muted-foreground">
80 Early bird (until Dec 31, 2025) 120 Regular (Jan-Jun 2026) 150 Late (after Jul 1,
2026)
</div>
<div className="text-xs text-muted-foreground mt-1">
CCA members: Bring two newcomers, get a free ticket!
</div>
</div>
<span className="text-lg font-semibold">{baseTicketPrice}.00</span>
</div>
{/* Accommodation */}
<div className="flex items-start justify-between py-4 border-b border-border">
<div className="flex items-start gap-3">
<Checkbox
id="accommodation"
checked={packages.accommodation}
onCheckedChange={(checked) => setPackages({ ...packages, accommodation: checked as boolean })}
className="mt-1"
/>
<Label htmlFor="accommodation" className="cursor-pointer">
<div className="font-medium">Accommodation (Optional)</div>
<div className="text-sm text-muted-foreground">6 nights dorm at Commons Hub (39.20/night)</div>
<div className="text-xs text-muted-foreground mt-1">
Double rooms available at 50.20/night per person
</div>
</Label>
</div>
<span className="text-lg font-semibold">{accommodationPrice.toFixed(2)}</span>
</div>
{/* Food */}
<div className="flex items-start justify-between py-4 border-b border-border">
<div className="flex items-start gap-3">
<Checkbox
id="food"
checked={packages.food}
onCheckedChange={(checked) => setPackages({ ...packages, food: checked as boolean })}
className="mt-1"
/>
<Label htmlFor="food" className="cursor-pointer">
<div className="font-medium">Food Package (Optional)</div>
<div className="text-sm text-muted-foreground">6 days: vegetarian breakfast, lunch & dinner</div>
<div className="text-xs text-muted-foreground mt-1">
3 days catered (35/day), 3 days self-organized (10/day)
</div>
</Label>
</div>
<span className="text-lg font-semibold">{foodPrice.toFixed(2)}</span>
</div>
{/* Total */}
<div className="flex justify-between items-center py-4 bg-primary/10 -mx-6 px-6 mt-4">
<div>
<div className="font-bold text-lg">Total Amount</div>
<div className="text-sm text-muted-foreground">
{packages.accommodation || packages.food
? "All selected items will be charged now"
: "Ticket only"}
</div>
<div className="text-sm text-muted-foreground">Early bird ticket</div>
</div>
<span className="text-2xl font-bold text-primary">{calculateTotal().toFixed(2)}</span>
<span className="text-2xl font-bold text-primary">{baseTicketPrice}.00</span>
</div>
</div>
</CardContent>
@ -173,7 +113,6 @@ export default function RegisterPage() {
<CardContent className="space-y-4">
<form action="/api/create-checkout-session" method="POST">
<input type="hidden" name="registrationData" value={JSON.stringify(formData)} />
<input type="hidden" name="packages" value={JSON.stringify(packages)} />
<div className="space-y-4">
<div>