From 9c3cea512f6ee7d8cef65ff103e3a6b891c7d39c Mon Sep 17 00:00:00 2001 From: Leo Giovanetti Date: Thu, 25 Aug 2022 12:18:03 -0300 Subject: [PATCH] Fixing back reference to recurring event when rescheduled (#3967) * fix: pass recurring count value * fix: show dates for pending booking * Restoring recurringEventId on reschedule * Reverting other changes from a different PR Co-authored-by: Udit Takkar Co-authored-by: Peer Richelsen Co-authored-by: Alex van Andel --- apps/web/pages/api/book/event.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/web/pages/api/book/event.ts b/apps/web/pages/api/book/event.ts index 035c768098..ab791a093e 100644 --- a/apps/web/pages/api/book/event.ts +++ b/apps/web/pages/api/book/event.ts @@ -621,6 +621,9 @@ async function handler(req: NextApiRequest) { if (newBookingData.attendees?.createMany?.data) { newBookingData.attendees.createMany.data = originalRescheduledBooking.attendees; } + if (originalRescheduledBooking.recurringEventId) { + newBookingData.recurringEventId = originalRescheduledBooking.recurringEventId; + } } const createBookingObj = { include: {