fix: Allow editing guests when rescheduling or editing a booking (#9878)

* Allow editing guests when rescheduling or editing

* lint fix

* modify reschedule logic that assigned originalRescheduledBooking.attendees to the "rescheduled" booking to ensure that guests added or removed are used for the "rescheduled" booking

---------

Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
pull/10086/head^2
jemiluv8 2023-07-12 10:14:11 +00:00 committed by GitHub
parent c6791a8d3c
commit 6d284ae15c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -59,15 +59,13 @@ export const BookingFields = ({
}
if (field.name === SystemField.Enum.guests) {
readOnly = false;
// No matter what user configured for Guests field, we don't show it for dynamic group booking as that doesn't support guests
hidden = isDynamicGroupBooking ? true : !!field.hidden;
}
// We don't show `notes` field during reschedule
if (
(field.name === SystemField.Enum.notes || field.name === SystemField.Enum.guests) &&
!!rescheduleUid
) {
if (field.name === SystemField.Enum.notes && !!rescheduleUid) {
return null;
}

View File

@ -1826,8 +1826,6 @@ async function handler(
newBookingData.attendees.createMany.data = attendeesData.filter(
(attendee) => attendee.email === bookerEmail
);
} else {
newBookingData.attendees.createMany.data = originalRescheduledBooking.attendees;
}
}
if (originalRescheduledBooking.recurringEventId) {