Add unlisted event status: hidden from listings but accessible by URL
- Backend: add 'unlisted' to schema enum and Zod validation; allow booking for unlisted events - Frontend: Event type and guards updated; unlisted events bookable, excluded from public listing/sitemap - Admin: badge, status dropdown, Make Unlisted / Make Public / Unpublish actions; scanner/emails/tickets include unlisted Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -671,10 +671,11 @@ export default function AdminScannerPage() {
|
||||
|
||||
// Load events
|
||||
useEffect(() => {
|
||||
eventsApi.getAll({ status: 'published' })
|
||||
eventsApi.getAll()
|
||||
.then((res) => {
|
||||
setEvents(res.events);
|
||||
const upcoming = res.events.filter((e) => new Date(e.startDatetime) >= new Date());
|
||||
const bookable = res.events.filter((e) => e.status === 'published' || e.status === 'unlisted');
|
||||
setEvents(bookable);
|
||||
const upcoming = bookable.filter((e) => new Date(e.startDatetime) >= new Date());
|
||||
if (upcoming.length === 1) {
|
||||
setSelectedEventId(upcoming[0].id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user