diff --git a/lib/CalEventParser.ts b/lib/CalEventParser.ts
index a38494f2..69724ccc 100644
--- a/lib/CalEventParser.ts
+++ b/lib/CalEventParser.ts
@@ -37,11 +37,7 @@ export default class CalEventParser {
* Returns a footer section with links to change the event (as HTML).
*/
public getChangeEventFooterHtml(): string {
- return `
-Need to change this event?
-Cancel: ${this.getCancelLink()}
-Reschedule: ${this.getRescheduleLink()}
- `;
+ return `
Need to make a change? Cancel or reschedule.
`;
}
/**
diff --git a/lib/emails/EventAttendeeMail.ts b/lib/emails/EventAttendeeMail.ts
index 3fd73f17..12d3d80d 100644
--- a/lib/emails/EventAttendeeMail.ts
+++ b/lib/emails/EventAttendeeMail.ts
@@ -18,24 +18,76 @@ export default class EventAttendeeMail extends EventMail {
protected getHtmlRepresentation(): string {
return (
`
-
- Hi ${this.calEvent.attendees[0].name},
-
- Your ${this.calEvent.type} with ${this.calEvent.organizer.name} at ${this.getInviteeStart().format(
- "h:mma"
- )}
- (${this.calEvent.attendees[0].timeZone}) on ${this.getInviteeStart().format(
- "dddd, LL"
- )} is scheduled.
-
` +
+
+
+
+
Your meeting has been booked
+
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.organizer.name} ${this.calEvent.organizer.email} |
+
+
+ Where |
+ ${this.getLocation()} |
+
+
+ Notes |
+ ${this.calEvent.description} |
+
+
+ ` +
this.getAdditionalBody() +
"
" +
- `
Additional notes:
- ${this.calEvent.description}
- ` +
+ `
+
+ ` +
this.getAdditionalFooter() +
`
-
+
+
+

+
`
);
}
@@ -47,7 +99,7 @@ export default class EventAttendeeMail 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) {
@@ -60,16 +112,14 @@ export default class EventAttendeeMail 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 ``;
}
/**
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() +
`
-
+
+
+

+
`
);
}
@@ -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);
+ }
}
diff --git a/pages/index.tsx b/pages/index.tsx
index 765842f7..264e4d8e 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -101,8 +101,8 @@ export default function Home(props) {
{props.eventTypes.map((type) => (
- -
-
+
-
+
@@ -121,9 +121,9 @@ export default function Home(props) {
-