Skip to content

Commit

Permalink
Fix - add team members to emails (calcom#7207)
Browse files Browse the repository at this point in the history
* 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 <zomars@me.com>

* Remove booking select object

* Revert "Remove booking select object"

This reverts commit 9f121ff.

* Refactor email manager (calcom#7270)

Co-authored-by: zomars <zomars@me.com>

* Type change

* Remove conditional check for updateAllCalendarEvents

---------

Co-authored-by: zomars <zomars@me.com>
  • Loading branch information
joeauyeung and zomars committed Feb 28, 2023
1 parent c7d22a8 commit 50be925
Show file tree
Hide file tree
Showing 23 changed files with 267 additions and 349 deletions.
1 change: 1 addition & 0 deletions apps/web/public/static/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,7 @@
"booking_with_payment_cancelled_refunded": "This booking payment has been refunded.",
"booking_confirmation_failed": "Booking confirmation failed",
"get_started_zapier_templates": "Get started with Zapier templates",
"team_member": "Team member",
"a_routing_form": "A Routing Form",
"form_description_placeholder": "Form Description",
"keep_me_connected_with_form": "Keep me connected with the form",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/EventManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ export default class EventManager {
results.push(result);
}

// Update all calendar events.
results.push(...(await this.updateAllCalendarEvents(evt, booking)));

const bookingPayment = booking?.payment;
Expand Down Expand Up @@ -442,7 +441,7 @@ export default class EventManager {
// Bookings should only have one calendar reference
calendarReference = booking.references.filter((reference) => reference.type.includes("_calendar"))[0];
if (!calendarReference) {
throw new Error("bookingRef");
return [];
}
const { uid: bookingRefUid, externalCalendarId: bookingExternalCalendarId } = calendarReference;

Expand Down
4 changes: 2 additions & 2 deletions packages/core/builders/CalendarEvent/class.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DestinationCalendar } from "@prisma/client";
import type { DestinationCalendar } from "@prisma/client";

import type {
AdditionalInformation,
Expand All @@ -16,7 +16,7 @@ class CalendarEventClass implements CalendarEvent {
organizer!: Person;
attendees!: Person[];
description?: string | null;
team?: { name: string; members: string[] };
team?: { name: string; members: Person[] };
location?: string | null;
conferenceData?: ConferenceData;
additionalInformation?: AdditionalInformation;
Expand Down
Loading

0 comments on commit 50be925

Please sign in to comment.