Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - add team members to emails #7207

Merged
merged 26 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
98cd23b
On booking add team members & translation
joeauyeung Feb 18, 2023
d128c3e
Add team members to round robin create
joeauyeung Feb 18, 2023
d05fe6f
Only update calendars on reschedule if there is a calendar reference
joeauyeung Feb 18, 2023
cbdda75
Send email on reschedules
joeauyeung Feb 18, 2023
3dcb5dd
Send team email on cancelled event
joeauyeung Feb 19, 2023
5e9fda7
Add team members to calendar event description
joeauyeung Feb 19, 2023
ff93467
Clean up
joeauyeung Feb 19, 2023
24becee
Convert other emails to organizer & teams
joeauyeung Feb 19, 2023
b4c7145
Type check fixes
joeauyeung Feb 19, 2023
94a6cae
More type fixes
joeauyeung Feb 19, 2023
8f3f17b
Change organizer scheduled input to an object
joeauyeung Feb 21, 2023
5a9f20b
early return updateCalendarEvent
joeauyeung Feb 21, 2023
5288fec
Introduce team member type
joeauyeung Feb 21, 2023
9035b05
Merge branch 'main' into teams-include-team-members-in-email
joeauyeung Feb 21, 2023
97d7842
Fix type errors
joeauyeung Feb 21, 2023
b4fb91f
Merge branch 'main' into teams-include-team-members-in-email
zomars Feb 22, 2023
25a3d97
Put team members before attendees
joeauyeung Feb 21, 2023
c4c629c
Remove lodash cloneDeep
joeauyeung Feb 21, 2023
7936b3a
Merge branch 'main' into teams-include-team-members-in-email
joeauyeung Feb 22, 2023
e6dfa35
Update packages/core/EventManager.ts
joeauyeung Feb 22, 2023
9f121ff
Remove booking select object
joeauyeung Feb 22, 2023
fe94312
Revert "Remove booking select object"
joeauyeung Feb 22, 2023
8ee8d7a
Refactor email manager (#7270)
joeauyeung Feb 23, 2023
e17f69e
Type change
joeauyeung Feb 24, 2023
3ecbebd
Remove conditional check for updateAllCalendarEvents
joeauyeung Feb 26, 2023
9f463dc
Merge branch 'main' into teams-include-team-members-in-email
zomars Feb 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer checking for calendar references here


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 [];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of throwing an error if no calendar references, we just return an empty array

}
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[] };
joeauyeung marked this conversation as resolved.
Show resolved Hide resolved
location?: string | null;
conferenceData?: ConferenceData;
additionalInformation?: AdditionalInformation;
Expand Down
Loading