fix: Salesforce - fix option to create contact if account exists (#21288)
* Add `onCheckedChange` * Remove console.logs
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user