diff --git a/lib/emails/EventOrganizerMail.ts b/lib/emails/EventOrganizerMail.ts index 9c60383c..1680ad9e 100644 --- a/lib/emails/EventOrganizerMail.ts +++ b/lib/emails/EventOrganizerMail.ts @@ -54,28 +54,78 @@ export default class EventOrganizerMail extends EventMail { protected getHtmlRepresentation(): string { return ( ` -
- Hi ${this.calEvent.organizer.name},
-
- A new event has been scheduled.
-
- Event Type:
- ${this.calEvent.type}
-
- Invitee Email:
- ${this.calEvent.attendees[0].email}
-
` + + +
+ + + +

A new event has been scheduled.

+

You and any other attendees have been emailed with this information.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
What${this.calEvent.type}
When${this.getInviteeStart().format("dddd, LL")}
${this.getInviteeStart().format("h:mma")} (${ + this.calEvent.attendees[0].timeZone + })
Who${this.calEvent.attendees[0].name}
${this.calEvent.attendees[0].email}
Where${this.getLocation()}
Notes${this.calEvent.description}
+ ` + this.getAdditionalBody() + - `Invitee Time Zone:
- ${this.calEvent.attendees[0].timeZone}
-
- Additional notes:
- ${this.calEvent.description} - ` + "
" + + ` +
+ ` + this.getAdditionalFooter() + ` -
+
+
+ Calendso Logo
+ ` ); } @@ -87,7 +137,7 @@ export default class EventOrganizerMail extends EventMail { */ protected getLocation(): string { if (this.additionInformation?.hangoutLink) { - return `Location: ${this.additionInformation?.hangoutLink}
`; + return `${this.additionInformation?.hangoutLink}
`; } if (this.additionInformation?.entryPoints && this.additionInformation?.entryPoints.length > 0) { @@ -100,16 +150,14 @@ export default class EventOrganizerMail extends EventMail { }) .join("
"); - return `Locations:
${locations}`; + return `${locations}`; } - return this.calEvent.location ? `Location: ${this.calEvent.location}

` : ""; + return this.calEvent.location ? `${this.calEvent.location}

` : ""; } protected getAdditionalBody(): string { - return ` - ${this.getLocation()} - `; + return ``; } /** * Returns the payload object for the nodemailer. @@ -137,4 +185,13 @@ export default class EventOrganizerMail extends EventMail { protected printNodeMailerError(error: string): void { console.error("SEND_NEW_EVENT_NOTIFICATION_ERROR", this.calEvent.organizer.email, error); } + + /** + * Returns the inviteeStart value used at multiple points. + * + * @private + */ + protected getInviteeStart(): Dayjs { + return dayjs(this.calEvent.startTime).tz(this.calEvent.attendees[0].timeZone); + } }