the banner edit is ready and name of participant its getting update in eache event
This commit is contained in:
@@ -35,7 +35,7 @@ export class EmailController {
|
||||
if(!file) {
|
||||
throw new HttpException("No se ha cargado ningun archivo", HttpStatus.BAD_REQUEST)
|
||||
}
|
||||
console.log(file)
|
||||
/* console.log(file) */
|
||||
return this.emailService.sendConstancias(file, nombreEvento);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export class EmailService {
|
||||
}
|
||||
|
||||
async sendConstancias(file, nombreEvento) {
|
||||
console.log(file)
|
||||
/* console.log(file) */
|
||||
const workbook = xlsx.read(file.buffer);
|
||||
const worksheet = workbook.Sheets[workbook.SheetNames[0]];
|
||||
const data = xlsx.utils.sheet_to_json(worksheet);
|
||||
@@ -68,22 +68,6 @@ export class EmailService {
|
||||
const page = pdfDoc.addPage();
|
||||
page.setSize(792, 612);
|
||||
|
||||
page.drawRectangle({
|
||||
x: 0,
|
||||
y: page.getHeight() - 60,
|
||||
width: page.getWidth(),
|
||||
height: 60,
|
||||
color: rgb(0 / 255, 61 / 255, 121 / 255),
|
||||
});
|
||||
|
||||
page.drawRectangle({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: page.getWidth(),
|
||||
height: 60,
|
||||
color: rgb(213 / 255, 159 / 255, 15 / 255),
|
||||
});
|
||||
|
||||
const font = await pdfDoc.embedFont(StandardFonts.HelveticaBold);
|
||||
const fontSize = 30;
|
||||
const text = 'Constancia de asistencia';
|
||||
@@ -126,8 +110,8 @@ export class EmailService {
|
||||
const url = URL.createObjectURL(blob); */
|
||||
this.transporter.sendMail({
|
||||
to: row.Email,
|
||||
subject: 'Constancia de asistencia',
|
||||
text: 'Hola',
|
||||
subject: `Constancia de asistencia a "${nombreEvento}"`,
|
||||
text: `¡Un saludo ${row.Nombre}! Aquí está tu constancia de asistencia por el evento "${nombreEvento}". Agradecemos tu asistencia y constancia, esperamos seguir viéndote en eventos futuros.`,
|
||||
attachments: [attachment],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user