diff --git a/apps/web/lib/emails/templates/attendee-awaiting-payment-email.ts b/apps/web/lib/emails/templates/attendee-awaiting-payment-email.ts index 9cf8823e..27fe50d6 100644 --- a/apps/web/lib/emails/templates/attendee-awaiting-payment-email.ts +++ b/apps/web/lib/emails/templates/attendee-awaiting-payment-email.ts @@ -48,6 +48,7 @@ ${this.attendee.language.translate("emailed_you_and_any_other_attendees")} ${this.getWhat()} ${this.getWhen()} ${this.getLocation()} +${this.getDescription()} ${this.getAdditionalNotes()} `.replace(/(<([^>]+)>)/gi, ""); } @@ -94,6 +95,7 @@ ${this.getAdditionalNotes()} ${this.getWhen()} ${this.getWho()} ${this.getLocation()} + ${this.getDescription()} ${this.getAdditionalNotes()} diff --git a/apps/web/lib/emails/templates/attendee-cancelled-email.ts b/apps/web/lib/emails/templates/attendee-cancelled-email.ts index 477ec5e4..d356beaf 100644 --- a/apps/web/lib/emails/templates/attendee-cancelled-email.ts +++ b/apps/web/lib/emails/templates/attendee-cancelled-email.ts @@ -47,6 +47,7 @@ ${this.attendee.language.translate("emailed_you_and_any_other_attendees")} ${this.getWhat()} ${this.getWhen()} ${this.getLocation()} +${this.getDescription()} ${this.getAdditionalNotes()} ${this.calEvent.cancellationReason && this.getCancellationReason()} `.replace(/(<([^>]+)>)/gi, ""); @@ -95,6 +96,7 @@ ${this.calEvent.cancellationReason && this.getCancellationReason()} ${this.getWhen()} ${this.getWho()} ${this.getLocation()} + ${this.getDescription()} ${this.getAdditionalNotes()} ${this.calEvent.cancellationReason && this.getCancellationReason()} diff --git a/apps/web/lib/emails/templates/attendee-declined-email.ts b/apps/web/lib/emails/templates/attendee-declined-email.ts index c27c3605..b1e36496 100644 --- a/apps/web/lib/emails/templates/attendee-declined-email.ts +++ b/apps/web/lib/emails/templates/attendee-declined-email.ts @@ -47,6 +47,7 @@ ${this.attendee.language.translate("emailed_you_and_any_other_attendees")} ${this.getWhat()} ${this.getWhen()} ${this.getLocation()} +${this.getDescription()} ${this.getAdditionalNotes()} ${this.getRejectionReason()} `.replace(/(<([^>]+)>)/gi, ""); @@ -95,6 +96,7 @@ ${this.getRejectionReason()} ${this.getWhen()} ${this.getWho()} ${this.getLocation()} + ${this.getDescription()} ${this.getAdditionalNotes()} ${this.getRejectionReason()} diff --git a/apps/web/lib/emails/templates/attendee-request-email.ts b/apps/web/lib/emails/templates/attendee-request-email.ts index 921b5d34..98dec12b 100644 --- a/apps/web/lib/emails/templates/attendee-request-email.ts +++ b/apps/web/lib/emails/templates/attendee-request-email.ts @@ -60,6 +60,7 @@ ${this.calEvent.attendees[0].language.translate("user_needs_to_confirm_or_reject ${this.getWhat()} ${this.getWhen()} ${this.getLocation()} +${this.getDescription()} ${this.getAdditionalNotes()} `.replace(/(<([^>]+)>)/gi, ""); } @@ -109,6 +110,7 @@ ${this.getAdditionalNotes()} ${this.getWhen()} ${this.getWho()} ${this.getLocation()} + ${this.getDescription()} ${this.getAdditionalNotes()} diff --git a/apps/web/lib/emails/templates/attendee-rescheduled-email.ts b/apps/web/lib/emails/templates/attendee-rescheduled-email.ts index 46bf6364..d232cf99 100644 --- a/apps/web/lib/emails/templates/attendee-rescheduled-email.ts +++ b/apps/web/lib/emails/templates/attendee-rescheduled-email.ts @@ -45,7 +45,6 @@ export default class AttendeeRescheduledEmail extends AttendeeScheduledEmail { text: this.getTextBody(), }; } - protected getTextBody(): string { // Only the original attendee can make changes to the event // Guests cannot @@ -56,6 +55,7 @@ export default class AttendeeRescheduledEmail extends AttendeeScheduledEmail { ${this.getWhat()} ${this.getWhen()} ${this.getLocation()} + ${this.getDescription()} ${this.getAdditionalNotes()} ${this.attendee.language.translate("need_to_reschedule_or_cancel")} ${getCancelLink(this.calEvent)} @@ -114,6 +114,7 @@ ${this.getAdditionalNotes()} ${this.getWhen()} ${this.getWho()} ${this.getLocation()} + ${this.getDescription()} ${this.getAdditionalNotes()} diff --git a/apps/web/lib/emails/templates/attendee-scheduled-email.ts b/apps/web/lib/emails/templates/attendee-scheduled-email.ts index 9f8cd49e..22730dc0 100644 --- a/apps/web/lib/emails/templates/attendee-scheduled-email.ts +++ b/apps/web/lib/emails/templates/attendee-scheduled-email.ts @@ -112,7 +112,18 @@ export default class AttendeeScheduledEmail { from: serverConfig.from, }; } - + protected getDescription(): string { + if (!this.calEvent.description) return ""; + return ` +
+${this.calEvent.organizer.language.translate("description")}
+${ + this.calEvent.description + }
+${this.calEvent.attendees[0].language.translate("additional_notes")}
${ - this.calEvent.description + this.calEvent.additionalNotes }
${this.calEvent.organizer.language.translate("additional_notes")}
+${ + this.calEvent.additionalNotes + }
+${this.calEvent.organizer.language.translate("description")}
${ this.calEvent.description }
diff --git a/apps/web/pages/api/book/event.ts b/apps/web/pages/api/book/event.ts index eed093b9..87d2c9f9 100644 --- a/apps/web/pages/api/book/event.ts +++ b/apps/web/pages/api/book/event.ts @@ -200,6 +200,7 @@ const getEventTypesFromDB = async (eventTypeId: number) => { length: true, eventName: true, schedulingType: true, + description: true, periodType: true, periodStartDate: true, periodEndDate: true, @@ -337,7 +338,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) t: tOrganizer, }; - const description = + const additionalNotes = reqBody.notes + reqBody.customInputs.reduce( (str, input) => str + "