This commit is contained in:
David Arranz 2024-08-29 12:18:50 +02:00
parent 4eebd85e67
commit 6911429c2d

View File

@ -94,16 +94,14 @@ const extraControllers = {
EventOverflow = await eventService._getEvent(Event.overflow_eventId);
result = Object.assign({}, result, {
allow: Event.assistants - Event.confirmed >= result.group_size, // false
allow: (Event.sold_out) ? Event.assistants - Event.confirmed >= result.group_size : false, // false
assistants: Event.assistants,
confirmed: Event.confirmed,
sold_out: Event.sold_out,
assistants_overflow: EventOverflow ? EventOverflow.assistants : 0,
confirmed_overflow: EventOverflow ? EventOverflow.confirmed : 0,
sold_out_overflow: EventOverflow ? EventOverflow.sold_out : 1,
allow_overflow: EventOverflow
? EventOverflow.assistants - EventOverflow.confirmed >= result.group_size
: false,
allow_overflow: EventOverflow ? ((EventOverflow ? EventOverflow.sold_out : 1) ? EventOverflow.assistants - EventOverflow.confirmed >= result.group_size : false) : false,
});
}