Fix - add team members to emails (#7207)
* On booking add team members & translation * Add team members to round robin create * Only update calendars on reschedule if there is a calendar reference * Send email on reschedules * Send team email on cancelled event * Add team members to calendar event description * Clean up * Convert other emails to organizer & teams * Type check fixes * More type fixes * Change organizer scheduled input to an object * early return updateCalendarEvent * Introduce team member type * Fix type errors * Put team members before attendees * Remove lodash cloneDeep * Update packages/core/EventManager.ts Co-authored-by: Omar López <[email protected]> * Remove booking select object * Revert "Remove booking select object" This reverts commit 9f121ff4ebbaec9a0643111f96c5337b930ddd5b. * Refactor email manager (#7270) Co-authored-by: zomars <[email protected]> * Type change * Remove conditional check for updateAllCalendarEvents --------- Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
2a98ca4b91
commit
8b07b839e9
23 files changed
+267
-349
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { TFunction } from "next-i18next";
|
||||
import type { TFunction } from "next-i18next";
|
||||
|
||||
import type { CalendarEvent } from "@calcom/types/Calendar";
|
||||
|
||||
@@ -27,6 +27,9 @@ export function WhoInfo(props: { calEvent: CalendarEvent; t: TFunction }) {
|
||||
role={t("organizer")}
|
||||
email={props.calEvent.organizer.email}
|
||||
/>
|
||||
{props.calEvent.team?.members.map((member) => (
|
||||
<PersonInfo key={member.name} name={member.name} role={t("team_member")} email={member.email} />
|
||||
))}
|
||||
{props.calEvent.attendees.map((attendee) => (
|
||||
<PersonInfo
|
||||
key={attendee.id || attendee.name}
|
||||
|
||||
@@ -7,6 +7,7 @@ export const OrganizerScheduledEmail = (
|
||||
calEvent: CalendarEvent;
|
||||
attendee: Person;
|
||||
newSeat?: boolean;
|
||||
teamMember?: Person;
|
||||
} & Partial<React.ComponentProps<typeof BaseScheduledEmail>>
|
||||
) => {
|
||||
let subject;
|
||||
@@ -26,10 +27,10 @@ export const OrganizerScheduledEmail = (
|
||||
title = "new_event_scheduled";
|
||||
}
|
||||
|
||||
const t = props.calEvent.organizer.language.translate;
|
||||
const t = props.teamMember?.language.translate || props.calEvent.organizer.language.translate;
|
||||
return (
|
||||
<BaseScheduledEmail
|
||||
timeZone={props.calEvent.organizer.timeZone}
|
||||
timeZone={props.teamMember?.timeZone || props.calEvent.organizer.timeZone}
|
||||
t={t}
|
||||
subject={t(subject)}
|
||||
title={t(title)}
|
||||
|
||||
Reference in new issue
Block a user