From f9da8eb12c346bfbb28ce97d4be6a65b96eef626 Mon Sep 17 00:00:00 2001 From: Bailey Pumfleet Date: Fri, 16 Jul 2021 21:57:44 +0100 Subject: [PATCH] Redesign invitee confirmation email --- lib/CalEventParser.ts | 6 +-- lib/emails/EventAttendeeMail.ts | 90 +++++++++++++++++++++++++-------- 2 files changed, 71 insertions(+), 25 deletions(-) diff --git a/lib/CalEventParser.ts b/lib/CalEventParser.ts index a38494f2aa..69724ccc8f 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 3fd73f17ae..12d3d80deb 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() + ` -
+
+
+ Calendso Logo
+ ` ); } @@ -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 ``; } /**