fix: booking confirmation email missing variables (#7109)

* fix: make the method public

* fix: missing variables
This commit is contained in:
Nafees Nazik authored and GitHub committed 2023-02-15 10:49:44 -07:00
1 parent c899921591
commit bb1c55e07f
2 files changed
+29 -21

No files matched your search

@@ -1,22 +1,30 @@
import AttendeeScheduledEmailClass from "../../templates/attendee-rescheduled-email";
import { AttendeeScheduledEmail } from "./AttendeeScheduledEmail";
export const AttendeeRequestEmail = (props: React.ComponentProps<typeof AttendeeScheduledEmail>) => (
<AttendeeScheduledEmail
title={props.calEvent.attendees[0].language.translate(
props.calEvent.recurringEvent?.count ? "booking_submitted_recurring" : "booking_submitted"
)}
subtitle={
<>
{props.calEvent.attendees[0].language.translate(
props.calEvent.recurringEvent?.count
? "user_needs_to_confirm_or_reject_booking_recurring"
: "user_needs_to_confirm_or_reject_booking",
{ user: props.calEvent.organizer.name }
)}
</>
}
headerType="calendarCircle"
subject={props.calEvent.attendees[0].language.translate("booking_submitted_subject")}
{...props}
/>
);
export const AttendeeRequestEmail = (props: React.ComponentProps<typeof AttendeeScheduledEmail>) => {
const date = new AttendeeScheduledEmailClass(props.calEvent, props.attendee).getFormattedDate();
return (
<AttendeeScheduledEmail
title={props.calEvent.attendees[0].language.translate(
props.calEvent.recurringEvent?.count ? "booking_submitted_recurring" : "booking_submitted"
)}
subtitle={
<>
{props.calEvent.attendees[0].language.translate(
props.calEvent.recurringEvent?.count
? "user_needs_to_confirm_or_reject_booking_recurring"
: "user_needs_to_confirm_or_reject_booking",
{ user: props.calEvent.organizer.name }
)}
</>
}
headerType="calendarCircle"
subject={props.calEvent.attendees[0].language.translate("booking_submitted_subject", {
title: props.calEvent.title,
date,
})}
{...props}
/>
);
};