Adding checkbox to toggle hideNotes (#2310)
This commit is contained in:
parent
80af5dd236
commit
6b0e8db496
1 changed files with 20 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue