Seats events send email to attendees and organizer (#3206)
* Add attendees to email notfications * New seat title * Change organizer email * Clean console.log * Fix type errors * Update packages/emails/src/templates/OrganizerScheduledEmail.tsx Co-authored-by: Omar López <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
5 files changed
+141
-67
No files matched your search
@@ -6,17 +6,33 @@ export const OrganizerScheduledEmail = (
|
||||
props: {
|
||||
calEvent: CalendarEvent;
|
||||
attendee: Person;
|
||||
newSeat?: boolean;
|
||||
} & Partial<React.ComponentProps<typeof BaseScheduledEmail>>
|
||||
) => {
|
||||
let subject;
|
||||
let title;
|
||||
|
||||
if (props.newSeat) {
|
||||
subject = "new_seat_subject";
|
||||
} else {
|
||||
subject = "confirmed_event_type_subject";
|
||||
}
|
||||
|
||||
if (props.calEvent.recurringEvent?.count) {
|
||||
title = "new_event_scheduled_recurring";
|
||||
} else if (props.newSeat) {
|
||||
title = "new_seat_title";
|
||||
} else {
|
||||
title = "new_event_scheduled";
|
||||
}
|
||||
|
||||
const t = props.calEvent.organizer.language.translate;
|
||||
return (
|
||||
<BaseScheduledEmail
|
||||
timeZone={props.calEvent.organizer.timeZone}
|
||||
t={t}
|
||||
subject={t("confirmed_event_type_subject")}
|
||||
title={t(
|
||||
props.calEvent.recurringEvent?.count ? "new_event_scheduled_recurring" : "new_event_scheduled"
|
||||
)}
|
||||
subject={t(subject)}
|
||||
title={t(title)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user