Hide other attendees on event types with seats (#4766)

* Add seatsHideAttendees to schema

* Add migration

* Add frontend option to hide attendees

* Pass hide attendees to email

* Hide attendee names on success email

* Add types for existing attendees

* Hide other attendees if hidden

* Pass seatsHideAttendees to Google Cal

* Add translation

* Reduce redundancy

* Fix type error

* Change toggle to show attendee information

* Minor text change

* Fix type errors

* Update snapshots

* Merge branch 'main' into seats-hide-attendees

* Add back email

* Add close.com specific types

* Add eslint ignore comments

* Merge branch 'seats-hide-attendees' of https://github.com/calcom/cal.com into seats-hide-attendees

* Simplify tests

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-10-18 13:41:50 -06:00
1 parent 7f2560e1e3
commit 8fc4d342fd
18 files changed
+125 -30

No files matched your search

@@ -153,6 +153,7 @@ const getEventTypesFromDB = async (eventTypeId: number) => {
hideCalendarNotes: true,
seatsPerTimeSlot: true,
recurringEvent: true,
seatsShowAttendees: true,
bookingLimits: true,
workflows: {
include: {
@@ -442,6 +443,7 @@ async function handler(req: NextApiRequest & { userId?: number }) {
hideCalendarNotes: eventType.hideCalendarNotes,
requiresConfirmation: eventType.requiresConfirmation ?? false,
eventTypeId: eventType.id,
seatsShowAttendees: !!eventType.seatsShowAttendees,
};
// For seats, if the booking already exists then we want to add the new attendee to the existing booking
@@ -502,7 +504,7 @@ async function handler(req: NextApiRequest & { userId?: number }) {
const newSeat = booking.attendees.length !== 0;
await sendScheduledSeatsEmails(evt, invitee[0], newSeat);
await sendScheduledSeatsEmails(evt, invitee[0], newSeat, !!eventType.seatsShowAttendees);
const credentials = await refreshCredentials(organizerUser.credentials);
const eventManager = new EventManager({ ...organizerUser, credentials });