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:
authored and GitHub committed 2024-09-26 17:08:25 +00:00
1 parent b6c6e41603
commit ae7fae7da4
29 files changed
+93 -5

No files matched your search

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "EventType" ADD COLUMN "hideCalendarEventDetails" BOOLEAN NOT NULL DEFAULT false;
+1
View File
@@ -110,6 +110,7 @@ model EventType {
recurringEvent Json?
disableGuests Boolean @default(false)
hideCalendarNotes Boolean @default(false)
hideCalendarEventDetails Boolean @default(false)
/// @zod.min(0)
minimumBookingNotice Int @default(120)
beforeEventBuffer Int @default(0)
+1
View File
@@ -648,6 +648,7 @@ export const allManagedEventTypeProps: { [k in keyof Omit<Prisma.EventTypeSelect
metadata: true,
children: true,
hideCalendarNotes: true,
hideCalendarEventDetails: true,
minimumBookingNotice: true,
beforeEventBuffer: true,
afterEventBuffer: true,