fix: Salesforce - fix option to create contact if account exists (#21288)

* Add `onCheckedChange`

* Remove console.logs
This commit is contained in:
Joe Au-Yeung
2025-05-13 22:17:57 +00:00
committed by GitHub
parent 1bd17ba365
commit 7e699ab810
2 changed files with 8 additions and 3 deletions
@@ -167,7 +167,14 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
icon="user-plus"
title={t("salesforce_create_event_on_contact")}
labelFor="create-event-on-contact">
<Switch size="sm" labelOnLeading checked={createEventOnLeadCheckForContact} />
<Switch
size="sm"
labelOnLeading
checked={createEventOnLeadCheckForContact}
onCheckedChange={(checked) => {
setAppData("createEventOnLeadCheckForContact", checked);
}}
/>
</Section.SubSectionHeader>
</Section.SubSection>
<CreateContactUnderAccount />
@@ -195,7 +195,6 @@ export const useEventTypeForm = ({
};
const getDirtyFields = (values: FormValues): Partial<FormValues> => {
console.log("🚀 ~ getDirtyFields ~ values:", values);
if (!isFormDirty) {
return {};
}
@@ -384,7 +383,6 @@ export const useEventTypeForm = ({
}, {}) as EventTypeUpdateInput;
if (dirtyFieldExists) {
console.log("🚀 ~ handleSubmit ~ filteredPayload:", filteredPayload);
onSubmit({ ...filteredPayload, id: eventType.id });
}
};