a
This commit is contained in:
parent
cb3436c133
commit
b827115bde
@ -352,11 +352,13 @@ console.log('actualizo confirmados de la nueva reserva');
|
|||||||
null)
|
null)
|
||||||
else
|
else
|
||||||
return handleResultResponse("No se ha podido actualizar el aforo de la reserva", null, params, res, httpStatus.NOT_FOUND);
|
return handleResultResponse("No se ha podido actualizar el aforo de la reserva", null, params, res, httpStatus.NOT_FOUND);
|
||||||
}
|
|
||||||
|
|
||||||
//Ponemos la reserva en SOLD_OUT y abrimos la lista de espera si se puede
|
//Ponemos la reserva en SOLD_OUT para que no se pueda apuntar nadie más
|
||||||
|
if (dataInscription.reservation.assistants == dataInscription.inscriptionsWithReservationCount)
|
||||||
|
await eventReservationService._updateSoldOutReservation(dataInscription.reservation.id, true);
|
||||||
|
}
|
||||||
|
// APUNTARSE A LISTA DE ESPERA SI SE PUEDE
|
||||||
else {
|
else {
|
||||||
await eventReservationService._updateSoldOutReservation(dataInscription.reservation.id, true);
|
|
||||||
if (dataInscription.reservation.allow_overflow === true) {
|
if (dataInscription.reservation.allow_overflow === true) {
|
||||||
dataInscription.validated = false;
|
dataInscription.validated = false;
|
||||||
dataInscription.inscriptionsWithReservationCount = await eventInscriptionService._getCountInscriptionsWithReservation(dataInscription.reservation.overflow_reservationId);
|
dataInscription.inscriptionsWithReservationCount = await eventInscriptionService._getCountInscriptionsWithReservation(dataInscription.reservation.overflow_reservationId);
|
||||||
@ -399,10 +401,13 @@ console.log('actualizo confirmados de la nueva reserva');
|
|||||||
null)
|
null)
|
||||||
else
|
else
|
||||||
return handleResultResponse("No se ha podido actualizar el aforo del evento", null, params, res, httpStatus.NOT_FOUND);
|
return handleResultResponse("No se ha podido actualizar el aforo del evento", null, params, res, httpStatus.NOT_FOUND);
|
||||||
|
|
||||||
|
//Ponemos el evento en SOLD_OUT
|
||||||
|
if (dataInscription.event.assistants == dataInscription.inscriptionsWithoutReservationCount)
|
||||||
|
await eventService._updateSoldOutEvent(dataInscription.event.id, true);
|
||||||
}
|
}
|
||||||
//Ponemos el evento en SOLD_OUT y abrimos la lista de espera si se puede
|
// APUNTARSE A la lista de espera si se puede
|
||||||
else {
|
else {
|
||||||
await eventService._updateSoldOutEvent(dataInscription.event.id, true);
|
|
||||||
if (dataInscription.event.allow_overflow === true) {
|
if (dataInscription.event.allow_overflow === true) {
|
||||||
dataInscription.validated = false;
|
dataInscription.validated = false;
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ const generalInvalidFields = [
|
|||||||
'userId', 'createdAt', 'updatedAt',
|
'userId', 'createdAt', 'updatedAt',
|
||||||
'assistants', 'confirmed', 'allow_multiple', 'overflow_eventId',
|
'assistants', 'confirmed', 'allow_multiple', 'overflow_eventId',
|
||||||
'state', 'confirmed',
|
'state', 'confirmed',
|
||||||
'multiple_limit', 'allow_overflow', 'marketing_list',
|
'multiple_limit', 'marketing_list',
|
||||||
];
|
];
|
||||||
|
|
||||||
routes.get('/events',
|
routes.get('/events',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user