Skip to content

Commit 7e699ab

Browse files
authored
fix: Salesforce - fix option to create contact if account exists (calcom#21288)
* Add `onCheckedChange` * Remove console.logs
1 parent 1bd17ba commit 7e699ab

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

packages/app-store/salesforce/components/EventTypeAppCardInterface.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,14 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
167167
icon="user-plus"
168168
title={t("salesforce_create_event_on_contact")}
169169
labelFor="create-event-on-contact">
170-
<Switch size="sm" labelOnLeading checked={createEventOnLeadCheckForContact} />
170+
<Switch
171+
size="sm"
172+
labelOnLeading
173+
checked={createEventOnLeadCheckForContact}
174+
onCheckedChange={(checked) => {
175+
setAppData("createEventOnLeadCheckForContact", checked);
176+
}}
177+
/>
171178
</Section.SubSectionHeader>
172179
</Section.SubSection>
173180
<CreateContactUnderAccount />

packages/platform/atoms/event-types/hooks/useEventTypeForm.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ export const useEventTypeForm = ({
195195
};
196196

197197
const getDirtyFields = (values: FormValues): Partial<FormValues> => {
198-
console.log("🚀 ~ getDirtyFields ~ values:", values);
199198
if (!isFormDirty) {
200199
return {};
201200
}
@@ -384,7 +383,6 @@ export const useEventTypeForm = ({
384383
}, {}) as EventTypeUpdateInput;
385384

386385
if (dirtyFieldExists) {
387-
console.log("🚀 ~ handleSubmit ~ filteredPayload:", filteredPayload);
388386
onSubmit({ ...filteredPayload, id: eventType.id });
389387
}
390388
};

0 commit comments

Comments
 (0)