fix: booking confirmation email missing variables (#7109)
* fix: make the method public * fix: missing variables
This commit is contained in:
parent
c899921591
commit
bb1c55e07f
|
@ -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}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -105,7 +105,7 @@ ${getRichDescription(this.calEvent)}
|
|||
return this.getRecipientTime(this.calEvent.endTime, format);
|
||||
}
|
||||
|
||||
protected getFormattedDate() {
|
||||
public getFormattedDate() {
|
||||
return `${this.getInviteeStart("h:mma")} - ${this.getInviteeEnd("h:mma")}, ${this.t(
|
||||
this.getInviteeStart("dddd").toLowerCase()
|
||||
)}, ${this.t(this.getInviteeStart("MMMM").toLowerCase())} ${this.getInviteeStart("D, YYYY")}`;
|
||||
|
|
Loading…
Reference in New Issue
Block a user