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
parent
c6791a8d3c
commit
6d284ae15c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue