feat: Add hideCalendarEventDetails option to event types (#16817)
* Add `hideCalendarEventDetails` to DB Co-authored-by: Alex van Andel <[email protected]> * Add option to hide calendar event details * Pass `hideCalendarEventDetails` to event object * Add to API * Add to CalendarEvent class * Pass `hideCalendarEventDetails` to calendar services * Adjust test * fix: move `hideCalendarEventDetails` to `api/v2/event-types_2024_06_14` and remove from older versions - Added `hideCalendarEventDetails` to `api/v2/event-types_2024_06_14` - Removed `hideCalendarEventDetails` from `api/v1` and `api/v2/event-types_2024_04_15` * fix: calEventRaw is undefined (use event instead) * chore: Remove debug artifact * fix: description id + update to copy * fix: Attempt at fixing type error * Add hideCalendarEventDetails to test builder --------- Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Somay Chauhan <[email protected]> Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
29 files changed
+93
-5
No files matched your search
@@ -898,6 +898,7 @@ async function handler(
|
||||
conferenceCredentialId,
|
||||
destinationCalendar,
|
||||
hideCalendarNotes: eventType.hideCalendarNotes,
|
||||
hideCalendarEventDetails: eventType.hideCalendarEventDetails,
|
||||
requiresConfirmation: !isConfirmedByDefault,
|
||||
eventTypeId: eventType.id,
|
||||
// if seats are not enabled we should default true
|
||||
|
||||
@@ -59,6 +59,7 @@ export const getEventTypesFromDB = async (eventTypeId: number) => {
|
||||
metadata: true,
|
||||
destinationCalendar: true,
|
||||
hideCalendarNotes: true,
|
||||
hideCalendarEventDetails: true,
|
||||
seatsPerTimeSlot: true,
|
||||
recurringEvent: true,
|
||||
seatsShowAttendees: true,
|
||||
|
||||
@@ -138,6 +138,7 @@ export const EventAdvancedTab = ({ eventType, team }: Pick<EventTypeSetupProps,
|
||||
const seatsLocked = shouldLockDisableProps("seatsPerTimeSlotEnabled");
|
||||
const requiresBookerEmailVerificationProps = shouldLockDisableProps("requiresBookerEmailVerification");
|
||||
const hideCalendarNotesLocked = shouldLockDisableProps("hideCalendarNotes");
|
||||
const hideCalendarEventDetailsLocked = shouldLockDisableProps("hideCalendarEventDetails");
|
||||
const eventTypeColorLocked = shouldLockDisableProps("eventTypeColor");
|
||||
const lockTimeZoneToggleOnBookingPageLocked = shouldLockDisableProps("lockTimeZoneToggleOnBookingPage");
|
||||
|
||||
@@ -323,6 +324,21 @@ export const EventAdvancedTab = ({ eventType, team }: Pick<EventTypeSetupProps,
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Controller
|
||||
name="hideCalendarEventDetails"
|
||||
render={({ field: { value, onChange } }) => (
|
||||
<SettingsToggle
|
||||
labelClassName="text-sm"
|
||||
toggleSwitchAtTheEnd={true}
|
||||
switchContainerClassName="border-subtle rounded-lg border py-6 px-4 sm:px-6"
|
||||
title={t("hide_calendar_event_details")}
|
||||
{...hideCalendarEventDetailsLocked}
|
||||
description={t("description_hide_calendar_event_details")}
|
||||
checked={value}
|
||||
onCheckedChange={(e) => onChange(e)}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Controller
|
||||
name="successRedirectUrl"
|
||||
render={({ field: { value, onChange } }) => (
|
||||
|
||||
Reference in new issue
Block a user