fix: BookingConfirmPage date format + guest confirmation email on payment

- Fix date display: slice ISO timestamp to first 10 chars before splitting
- Add sendBookingConfirmedEmail() to email.ts — sends green styled HTML email
  with booking details (dates, amount) on payment.succeeded webhook
- Webhook now sends confirmation email to guest email if present

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-08 03:02:18 +03:00
parent fb7d907b40
commit c8d2d87db4
3 changed files with 82 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ interface OnlineBookingStatus {
}
function formatDate(d: string) {
const [y, m, day] = d.split('-')
const [y, m, day] = d.slice(0, 10).split('-')
return `${day}.${m}.${y}`
}