.
This commit is contained in:
parent
58d7f48c5e
commit
dbfa733f5d
@ -75,15 +75,28 @@ function generateHeaderMail(member) {
|
||||
}
|
||||
|
||||
function generateHeaderMailReservation(reservation) {
|
||||
|
||||
function _getDestinationMail() {
|
||||
if (lodash.isNull(reservation.Entity)) {
|
||||
return reservation.contact_email;
|
||||
} else {
|
||||
return reservation.Entity.contact_email ? reservation.Entity.contact_email : reservation.contact_email;
|
||||
}
|
||||
}
|
||||
|
||||
let headerMail = null;
|
||||
|
||||
if (reservation) {
|
||||
headerMail = {
|
||||
to: reservation.Entity ? reservation.Entity.contact_email : reservation.contact_email,
|
||||
name: reservation.Entity ? reservation.Entity.name : reservation.contact_name,
|
||||
bcc: "cbarrantes@loquedeverdadimporta.org",
|
||||
bccName: "Carolina Barrantes",
|
||||
subject: "Códigos de invitación para congreso LQDVI",
|
||||
};
|
||||
let toMail = _getDestinationMail();
|
||||
if (!lodash.isNull(toMail)) {
|
||||
headerMail = {
|
||||
to: toMail,
|
||||
name: reservation.Entity ? reservation.Entity.name : reservation.contact_name,
|
||||
bcc: "cbarrantes@loquedeverdadimporta.org",
|
||||
bccName: "Carolina Barrantes",
|
||||
subject: "Códigos de invitación para congreso LQDVI",
|
||||
};
|
||||
}
|
||||
}
|
||||
console.log('generateHeaderMailReservation>>>>>>>', headerMail);
|
||||
return headerMail;
|
||||
@ -174,7 +187,7 @@ async function sendEmailCancelate(inscription) {
|
||||
}
|
||||
|
||||
|
||||
async function _sendInscriptionEmail(dataInscription, member) {
|
||||
/*async function _sendInscriptionEmail(dataInscription, member) {
|
||||
let mailDTO = _generateMailDTO(inscription);
|
||||
member.qrConfig = QRHelper.generateQRConfig(member);
|
||||
member.qrCode = await QRHelper.getInscriptionQRCode(member.qrConfig);
|
||||
@ -189,7 +202,7 @@ async function _sendInscriptionEmail(dataInscription, member) {
|
||||
} catch (error) {
|
||||
console.log("No se ha podido mandar email con entrada");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
async function sendReservationEmail(reservation) {
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user