CCP restore/tunnel/upgrade + upgrade.sh release-mode fixes + volunteer dashboard polish
- Add instance restore model, routes, and agent backup/restore endpoints - Add Pangolin tunnel service (subdomain prefix, teardown action, CCP client) - Add slug mutex for concurrent operation safety in agent - Expand upgrade service with remote driver orchestration - Fix upgrade.sh to properly handle release-mode installs (no git operations) - Add CCP registration flags to config.sh (--ccp-url, --ccp-invite-code, --ccp-agent-url) - Auto-detect JVB advertise IP in non-interactive mode - Polish volunteer dashboard ActionStepsList with highlighted step component - Add ticketed event description field + volunteer dashboard query refinements Bunker Admin
This commit is contained in:
@@ -50,6 +50,7 @@ export const updateEventSchema = z.object({
|
||||
maxAttendees: z.number().int().positive().nullable().optional(),
|
||||
organizerName: z.string().max(200).nullable().optional(),
|
||||
organizerEmail: z.string().email().nullable().optional(),
|
||||
featured: z.boolean().optional(),
|
||||
});
|
||||
|
||||
export const createTierSchema = z.object({
|
||||
|
||||
@@ -114,24 +114,31 @@ async function getReferral(userId: string): Promise<DashboardReferral> {
|
||||
async function getFeaturedEvent(): Promise<DashboardFeaturedEvent | null> {
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
const event = await prisma.ticketedEvent.findFirst({
|
||||
where: {
|
||||
featured: true,
|
||||
status: TicketedEventStatus.PUBLISHED,
|
||||
date: { gte: today },
|
||||
},
|
||||
orderBy: { date: 'asc' },
|
||||
select: {
|
||||
slug: true,
|
||||
title: true,
|
||||
date: true,
|
||||
startTime: true,
|
||||
venueName: true,
|
||||
coverImageUrl: true,
|
||||
currentAttendees: true,
|
||||
maxAttendees: true,
|
||||
},
|
||||
});
|
||||
const eventSelect = {
|
||||
slug: true,
|
||||
title: true,
|
||||
date: true,
|
||||
startTime: true,
|
||||
venueName: true,
|
||||
coverImageUrl: true,
|
||||
currentAttendees: true,
|
||||
maxAttendees: true,
|
||||
} as const;
|
||||
const baseWhere = { status: TicketedEventStatus.PUBLISHED, date: { gte: today } };
|
||||
|
||||
// Prefer admin-featured event; fall back to next upcoming published event
|
||||
const event =
|
||||
await prisma.ticketedEvent.findFirst({
|
||||
where: { ...baseWhere, featured: true },
|
||||
orderBy: { date: 'asc' },
|
||||
select: eventSelect,
|
||||
}) ??
|
||||
await prisma.ticketedEvent.findFirst({
|
||||
where: baseWhere,
|
||||
orderBy: { date: 'asc' },
|
||||
select: eventSelect,
|
||||
});
|
||||
|
||||
if (!event) return null;
|
||||
return {
|
||||
slug: event.slug,
|
||||
|
||||
Reference in New Issue
Block a user