Skip to content

Scheduling infrastructure for absolutely everyone.

Adding checkbox to toggle hideNotes (#2310)

sean-brydon6b0e8db49678
diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx
index fcf3773f81c..825bc720b72 100644
--- a/apps/web/pages/event-types/[type].tsx
+++ b/apps/web/pages/event-types/[type].tsx
@@ -424,6 +424,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
schedulingType: SchedulingType | null;
price: number;
hidden: boolean;
+ hideCalendarNotes: boolean;
locations: { type: LocationType; address?: string; link?: string }[];
customInputs: EventTypeCustomInput[];
users: string[];
@@ -1228,6 +1229,24 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
</div>
</div>
+ <Controller
+ name="hideCalendarNotes"
+ control={formMethods.control}
+ defaultValue={eventType.hideCalendarNotes}
+ render={() => (
+ <CheckboxField
+ id="hideCalendarNotes"
+ name="hideCalendarNotes"
+ label={t("disable_notes")}
+ description={t("disable_notes_description")}
+ defaultChecked={eventType.hideCalendarNotes}
+ onChange={(e) => {
+ formMethods.setValue("hideCalendarNotes", e?.target.checked);
+ }}
+ />
+ )}
+ />
+
<Controller
name="requiresConfirmation"
control={formMethods.control}
@@ -1873,6 +1892,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
periodEndDate: true,
periodCountCalendarDays: true,
requiresConfirmation: true,
+ hideCalendarNotes: true,
disableGuests: true,
minimumBookingNotice: true,
beforeEventBuffer: true,