@ideal-photography/shared
Version:
Shared MongoDB and utility logic for Ideal Photography PWAs: users, products, services, bookings, orders/cart, galleries, reviews, notifications, campaigns, settings, audit logs, minimart items/orders, and push notification subscriptions.
64 lines (50 loc) • 3.26 kB
JavaScript
/**
* Build booking confirmation email
*/
export function buildBookingConfirmationEmail({ name, bookingDetails, confirmationUrl }) {
const html = `
<div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;">
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center; border-radius: 10px 10px 0 0;">
<h1 style="margin: 0; font-size: 28px;">Booking Confirmed!</h1>
<p style="margin: 10px 0 0 0; font-size: 16px; opacity: 0.9;">Your photography session has been successfully booked</p>
</div>
<div style="background: #f8f9fa; padding: 30px; border-radius: 0 0 10px 10px;">
<h2 style="color: #333; margin-top: 0;">Hello ${name}!</h2>
<p style="color: #666; line-height: 1.6;">We're excited to confirm your photography session with IDEAS MEDIA COMPANY. Here are your booking details:</p>
<div style="background: white; padding: 20px; border-radius: 8px; margin: 20px 0; border-left: 4px solid #667eea;">
<h3 style="color: #333; margin-top: 0;">Booking Details</h3>
<p><strong>Session Type:</strong> ${bookingDetails.type || 'Photography Session'}</p>
<p><strong>Date:</strong> ${bookingDetails.date || 'TBD'}</p>
<p><strong>Time:</strong> ${bookingDetails.time || 'TBD'}</p>
<p><strong>Duration:</strong> ${bookingDetails.duration || 'TBD'}</p>
<p><strong>Location:</strong> ${bookingDetails.location || 'TBD'}</p>
<p><strong>Total Amount:</strong> ${bookingDetails.amount || 'TBD'}</p>
</div>
<p style="color: #666; line-height: 1.6;">We'll be in touch soon with more details about your session. If you have any questions, please don't hesitate to contact us.</p>
<div style="text-align: center; margin: 30px 0;">
<a href="${confirmationUrl || '#'}" style="background: #667eea; color: white; padding: 12px 30px; text-decoration: none; border-radius: 5px; display: inline-block; font-weight: bold;">View Booking Details</a>
</div>
<p style="color: #999; font-size: 14px; text-align: center; margin-top: 30px;">
Best regards,<br>
IDEAS MEDIA COMPANY Team
</p>
</div>
</div>
`;
const text = `
Booking Confirmed!
Hello ${name}!
We're excited to confirm your photography session with IDEAS MEDIA COMPANY.
Booking Details:
- Session Type: ${bookingDetails.type || 'Photography Session'}
- Date: ${bookingDetails.date || 'TBD'}
- Time: ${bookingDetails.time || 'TBD'}
- Duration: ${bookingDetails.duration || 'TBD'}
- Location: ${bookingDetails.location || 'TBD'}
- Total Amount: ${bookingDetails.amount || 'TBD'}
We'll be in touch soon with more details about your session.
Best regards,
IDEAS MEDIA COMPANY Team
`;
return { html, text };
}