diff --git a/packages/features/eventtypes/components/Locations.tsx b/packages/features/eventtypes/components/Locations.tsx index bcaf84085f80cd..c679192a0eb215 100644 --- a/packages/features/eventtypes/components/Locations.tsx +++ b/packages/features/eventtypes/components/Locations.tsx @@ -348,7 +348,6 @@ const Locations: React.FC = ({
{ return ( = ({ { return ( = ({ { return ( = ({ {!isPlatform && ( { return ( = ({ {!isPlatform && ( { return ( = ({ location.type === "integrations:daily"); + + const shouldSubmit = dirtyFieldExists || hasDailyVideo; + + // Get calVideoSettings from dirty values or current form values + const finalCalVideoSettings = + calVideoSettings || values.calVideoSettings || defaultValues.calVideoSettings; + const payload = { ...rest, length, @@ -401,6 +419,8 @@ export const useEventTypeForm = ({ aiPhoneCallConfig: rest.aiPhoneCallConfig ? { ...rest.aiPhoneCallConfig, templateType: rest.aiPhoneCallConfig.templateType as TemplateType } : undefined, + // Always include calVideoSettings if Daily.co video is selected + ...(hasDailyVideo && { calVideoSettings: finalCalVideoSettings }), } satisfies EventTypeUpdateInput; // Filter out undefined values const filteredPayload = Object.entries(payload).reduce((acc, [key, value]) => { @@ -411,7 +431,7 @@ export const useEventTypeForm = ({ return acc; }, {}) as EventTypeUpdateInput; - if (dirtyFieldExists) { + if (shouldSubmit) { onSubmit({ ...filteredPayload, id: eventType.id }); } };