From b0ab75dff6d4325010f1a83d88f6911168377ba9 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Fri, 28 May 2021 23:34:28 +0000 Subject: [PATCH] Added the optional Location information + fixed nonfunctional a tag --- lib/emails/confirm-booked.ts | 6 ++++-- lib/emails/new-event.ts | 13 ++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/emails/confirm-booked.ts b/lib/emails/confirm-booked.ts index 868ad001..32c45695 100644 --- a/lib/emails/confirm-booked.ts +++ b/lib/emails/confirm-booked.ts @@ -54,8 +54,10 @@ const html = (calEvent: CalendarEvent) => {
Your ${calEvent.type} with ${calEvent.organizer.name} at ${inviteeStart.format('h:mma')} (${calEvent.attendees[0].timeZone}) on ${inviteeStart.format('dddd, LL')} is scheduled.
-
- Additional notes:
+
` + ( + calEvent.location ? `Location: ${calEvent.location}

` : '' + ) + + `Additional notes:
${calEvent.description} `; diff --git a/lib/emails/new-event.ts b/lib/emails/new-event.ts index a7b92b8b..54eea414 100644 --- a/lib/emails/new-event.ts +++ b/lib/emails/new-event.ts @@ -91,9 +91,16 @@ const html = (evt: CalendarEvent) => ` ${evt.type}

Invitee Email:
- ${evt.attendees[0].email}
-
- Invitee Time Zone:
+ ${evt.attendees[0].email}
+
` + + ( + evt.location ? ` + Location:
+ ${evt.location}
+
+ ` : '' + ) + + `Invitee Time Zone:
${evt.attendees[0].timeZone}

Additional notes: