diff --git a/pages/event-types/[type].tsx b/pages/event-types/[type].tsx index 8c435391ba05c4..34d1719ca25648 100644 --- a/pages/event-types/[type].tsx +++ b/pages/event-types/[type].tsx @@ -46,6 +46,7 @@ import { WorkingHours } from "@lib/types/schedule"; import { Dialog, DialogContent, DialogTrigger } from "@components/Dialog"; import Shell from "@components/Shell"; import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent"; +import { Form } from "@components/form/fields"; import CustomInputTypeForm from "@components/pages/eventtypes/CustomInputTypeForm"; import Button from "@components/ui/Button"; import { Scheduler } from "@components/ui/Scheduler"; @@ -500,8 +501,9 @@ const EventTypePage = (props: inferSSRProps) => {
-
{ + { const enteredTitle: string = values.title; const advancedPayload: AdvancedOptions = {}; @@ -514,12 +516,10 @@ const EventTypePage = (props: inferSSRProps) => { advancedPayload.periodEndDate = values.periodDates.endDate || undefined; advancedPayload.minimumBookingNotice = values.minimumBookingNotice; advancedPayload.slotInterval = values.slotInterval; - // prettier-ignore - advancedPayload.price = - !requirePayment ? undefined : - values.price ? Math.round(parseFloat(asStringOrThrow(values.price)) * 100) : - /* otherwise */ 0; - advancedPayload.currency = currency; // + advancedPayload.price = requirePayment + ? Math.round(parseFloat(asStringOrThrow(values.price)) * 100) + : 0; + advancedPayload.currency = currency; advancedPayload.availability = values.scheduler.enteredAvailability || undefined; advancedPayload.customInputs = values.customInputs; advancedPayload.timeZone = values.scheduler.selectedTimezone; @@ -544,7 +544,7 @@ const EventTypePage = (props: inferSSRProps) => { : {}), }; updateMutation.mutate(payload); - })} + }} className="space-y-6">
@@ -1105,7 +1105,7 @@ const EventTypePage = (props: inferSSRProps) => {
- +
@@ -1176,8 +1176,9 @@ const EventTypePage = (props: inferSSRProps) => {
-
{ + { const newLocation = values.locationType; let details = {}; @@ -1200,7 +1201,7 @@ const EventTypePage = (props: inferSSRProps) => { } setShowLocationModal(false); - })}> + }}> ) => { {t("cancel")} - +