From 06df6c9e916263397ac63a190559f0211cba2aeb Mon Sep 17 00:00:00 2001 From: Miguel Nieto A <39246879+miguelnietoa@users.noreply.github.com> Date: Thu, 7 Apr 2022 10:34:49 -0500 Subject: [PATCH] Save event-type's currency on db (#2404) * Save event-type's currency on db * Add currency field to formMethods definition --- apps/web/pages/event-types/[type].tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx index 7cb5b3c375..e7cab3a7eb 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -472,6 +472,7 @@ const EventTypePage = (props: inferSSRProps) => { requiresConfirmation: boolean; schedulingType: SchedulingType | null; price: number; + currency: string; hidden: boolean; hideCalendarNotes: boolean; locations: { type: LocationType; address?: string; link?: string }[]; @@ -915,6 +916,9 @@ const EventTypePage = (props: inferSSRProps) => { locations, ...input } = values; + + if (requirePayment) input.currency = currency; + updateMutation.mutate({ ...input, locations,