fix: handle collective multiple host on destinationCalendar (#10967)

This commit is contained in:
alannnc authored and GitHub committed 2023-08-31 10:47:02 -07:00
1 parent 500bfb4d82
commit c4e5d168a5
22 files changed
+371 -219

No files matched your search

@@ -149,7 +149,11 @@ export async function handlePaymentSuccess(
},
attendees: attendeesList,
uid: booking.uid,
destinationCalendar: booking.destinationCalendar || user.destinationCalendar,
destinationCalendar: booking.destinationCalendar
? [booking.destinationCalendar]
: user.destinationCalendar
? [user.destinationCalendar]
: [],
recurringEvent: parseRecurringEvent(eventTypeRaw?.recurringEvent),
};
+4 -4
View File
@@ -98,7 +98,7 @@ async function getBooking(bookingId: number) {
});
const attendeesList = await Promise.all(attendeesListPromises);
const selectedDestinationCalendar = booking.destinationCalendar || user.destinationCalendar;
const evt: CalendarEvent = {
type: booking.title,
title: booking.title,
@@ -116,7 +116,7 @@ async function getBooking(bookingId: number) {
},
attendees: attendeesList,
uid: booking.uid,
destinationCalendar: booking.destinationCalendar || user.destinationCalendar,
destinationCalendar: selectedDestinationCalendar ? [selectedDestinationCalendar] : [],
recurringEvent: parseRecurringEvent(eventType?.recurringEvent),
};
@@ -204,7 +204,7 @@ async function handlePaymentSuccess(event: Stripe.Event) {
});
const attendeesList = await Promise.all(attendeesListPromises);
const selectedDestinationCalendar = booking.destinationCalendar || user.destinationCalendar;
const evt: CalendarEvent = {
type: booking.title,
title: booking.title,
@@ -226,7 +226,7 @@ async function handlePaymentSuccess(event: Stripe.Event) {
attendees: attendeesList,
location: booking.location,
uid: booking.uid,
destinationCalendar: booking.destinationCalendar || user.destinationCalendar,
destinationCalendar: selectedDestinationCalendar ? [selectedDestinationCalendar] : [],
recurringEvent: parseRecurringEvent(eventTypeRaw?.recurringEvent),
};