Add series management and ticketing features: Introduce series event functionality in event creation, enhance event display with series information, and implement ticketing options for public events. Update layouts and improve form handling for better user experience.
This commit is contained in:
parent
c3a29fa47c
commit
a88aa62198
24 changed files with 2897 additions and 44 deletions
|
|
@ -37,6 +37,23 @@ export default defineEventHandler(async (event) => {
|
|||
registrationDeadline: body.registrationDeadline ? new Date(body.registrationDeadline) : null,
|
||||
updatedAt: new Date()
|
||||
}
|
||||
|
||||
// Handle ticket data
|
||||
if (body.tickets) {
|
||||
updateData.tickets = {
|
||||
enabled: body.tickets.enabled || false,
|
||||
public: {
|
||||
available: body.tickets.public?.available || false,
|
||||
name: body.tickets.public?.name || 'Public Ticket',
|
||||
description: body.tickets.public?.description || '',
|
||||
price: body.tickets.public?.price || 0,
|
||||
quantity: body.tickets.public?.quantity || null,
|
||||
sold: body.tickets.public?.sold || 0,
|
||||
earlyBirdPrice: body.tickets.public?.earlyBirdPrice || null,
|
||||
earlyBirdDeadline: body.tickets.public?.earlyBirdDeadline ? new Date(body.tickets.public.earlyBirdDeadline) : null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const updatedEvent = await Event.findByIdAndUpdate(
|
||||
eventId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue