Archived
Add waitlist for sold-out tickets
Events can take a waitlist for sold-out lines. When places free up (cancellation, smaller booking, higher stock limit) the next person is offered them with a claim link and the places are held for a set time; unclaimed offers expire and move on, with optional partial offers. Stock is now counted in one place (utils/stock.js), including held places, and manual registrations and booking edits are now stock-checked. Adds a supervisor waitlist page, My Events waitlists, and the daily summary count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import { ContactButton } from "@/components/events/ContactButton";
|
||||
price: number;
|
||||
picture?: string;
|
||||
isSoldOut?: boolean;
|
||||
waitlistEnabled?: boolean;
|
||||
requiresRegistration?: boolean;
|
||||
contactName?: string | null;
|
||||
contactPhone?: string | null;
|
||||
@@ -88,6 +89,14 @@ export const EventCard = ({ event }: { event: Event }) => {
|
||||
</button>
|
||||
);
|
||||
}
|
||||
if (event.isSoldOut && event.waitlistEnabled) {
|
||||
// Sold out with a waitlist: send them to the event page to join it.
|
||||
return (
|
||||
<a href={`/events/${event.id}`} className="flex-1 text-center text-sm text-brand-700 bg-white border border-brand-300 rounded-lg py-2 hover:bg-brand-50">
|
||||
Sold out — join waitlist
|
||||
</a>
|
||||
);
|
||||
}
|
||||
if (event.isSoldOut) {
|
||||
return (
|
||||
<button disabled className="flex-1 text-center text-sm text-red-700 bg-red-50 border border-red-200 rounded-lg py-2 cursor-not-allowed">
|
||||
|
||||
Reference in New Issue
Block a user