This commit is contained in:
David Arranz 2019-09-13 17:04:37 +02:00
parent 70d7c9e9b8
commit 34ec013417

View File

@ -225,7 +225,7 @@ console.log(params, req.user.level);
const inscriptionId = params.params.id; const inscriptionId = params.params.id;
try { try {
const inscription = await eventInscriptionService._getInscriptionById(inscriptionId); let inscription = await eventInscriptionService._getInscriptionById(inscriptionId);
//console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>><Inscripcion a Validar:'); //console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>><Inscripcion a Validar:');
//console.log(inscription); //console.log(inscription);
@ -251,6 +251,7 @@ console.log(params, req.user.level);
const OverflowEventId = inscription.overflowEventId; const OverflowEventId = inscription.overflowEventId;
if (await eventInscriptionService._validateInscription(inscription.id, user.id) > 0) { if (await eventInscriptionService._validateInscription(inscription.id, user.id) > 0) {
inscription.validated = true;
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>><Inscripcion validada'); console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>><Inscripcion validada');
var NewConfirmedOverflow = await eventInscriptionService._getCountInscriptionsWithOverflowEventId(OverflowEventId); var NewConfirmedOverflow = await eventInscriptionService._getCountInscriptionsWithOverflowEventId(OverflowEventId);
var NewConfirmedEvent = await eventInscriptionService._getCountInscriptionsWithoutReservationAndOverflow(inscription.eventId); var NewConfirmedEvent = await eventInscriptionService._getCountInscriptionsWithoutReservationAndOverflow(inscription.eventId);
@ -352,8 +353,11 @@ console.log('generamos member para mailchimp y correo>>>>>>>>>>>>>>>>>>>>> ', me
member.qrConfig = generateQRConfig(member); member.qrConfig = generateQRConfig(member);
member.qrCode = await QRHelper.getInscriptionQRCode(member.qrConfig); member.qrCode = await QRHelper.getInscriptionQRCode(member.qrConfig);
let headerMail = generateHeaderMail(member);
headerMail.subjet = 'Cancelación de ' + headerMail.subjet;
try { try {
emailHelper.sendCancelacion(generateHeaderMail(member), generateBodyMail(member)) emailHelper.sendCancelacion(headerMail, generateBodyMail(member))
} catch (error) { } catch (error) {
console.log('No se ha podido mandar email con entrada'); console.log('No se ha podido mandar email con entrada');
}; };