63 lines
2.3 KiB
TypeScript
63 lines
2.3 KiB
TypeScript
export function generarHtmlCorreoAsistencia({
|
|
nombreForm,
|
|
nombreEvento,
|
|
correo,
|
|
fechaRegistro,
|
|
fechaInicioEvento,
|
|
fechaFinEvento,
|
|
}: {
|
|
nombreForm: string;
|
|
nombreEvento: string;
|
|
correo: string;
|
|
fechaRegistro: string;
|
|
fechaInicioEvento?: string;
|
|
fechaFinEvento?: string;
|
|
}) {
|
|
const horarioEvento =
|
|
fechaInicioEvento && fechaFinEvento
|
|
? `
|
|
<div style="margin: 20px 0; padding: 12px; background-color: #e8f0fe; border-left: 4px solid #003d79;">
|
|
<p style="margin: 0; font-size: 15px; color: #003d79;">
|
|
<strong>🕒 Horario del evento:</strong><br/>
|
|
${fechaInicioEvento} <strong>al</strong> ${fechaFinEvento}
|
|
</p>
|
|
</div>
|
|
`
|
|
: '';
|
|
|
|
return `
|
|
<div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 24px; border: 1px solid #ccc; border-radius: 8px; background-color: #f9f9f9;">
|
|
<h1 style="color: #003d79; border-bottom: 2px solid #003d79; padding-bottom: 10px;">🎓 ¡Gracias por registrarte!</h1>
|
|
|
|
<p style="font-size: 16px; color: #333;">
|
|
Has completado exitosamente el formulario: <strong>${nombreForm}</strong>
|
|
</p>
|
|
|
|
<p style="font-size: 16px; color: #333;">
|
|
Favor de presentar este código QR (en tu celular o impreso) en las mesas de juegos el día del evento, para participar por tu premio.
|
|
</p>
|
|
|
|
<div style="text-align: center; margin: 20px 0;">
|
|
<img src="cid:qrCode" alt="Código QR" style="width: 250px; height: 250px; border: 1px solid #ccc; padding: 8px; background-color: white;" />
|
|
</div>
|
|
|
|
<h3 style="color: #003d79;">📋 Tus datos de registro:</h3>
|
|
<ul style="font-size: 15px; color: #333; line-height: 1.6;">
|
|
<li><strong>Evento:</strong> ${nombreEvento || 'Evento'}</li>
|
|
<li><strong>Correo:</strong> ${correo}</li>
|
|
<li><strong>Fecha de registro:</strong> ${fechaRegistro}</li>
|
|
</ul>
|
|
|
|
${horarioEvento}
|
|
|
|
<p style="margin-top: 30px; font-size: 14px; color: #666;">
|
|
Si tienes alguna duda, acude al módulo de información durante el evento.
|
|
</p>
|
|
|
|
<p style="font-size: 13px; color: #999; text-align: center; margin-top: 40px;">
|
|
Este mensaje fue enviado automáticamente. Por favor, no respondas a este correo.
|
|
</p>
|
|
</div>
|
|
`;
|
|
}
|