feat: add skipContactCreation toggle to EventTypeAppCard component (#25756)

Co-authored-by: Amit Sharma <74371312+Amit91848@users.noreply.github.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-12-12 18:55:19 +00:00
1 parent 411483a447
commit 3cadf105d5
2 files changed
+19 -2

No files matched your search

@@ -6,8 +6,8 @@ import useIsAppEnabled from "@calcom/app-store/_utils/useIsAppEnabled";
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Section } from "@calcom/ui/components/section";
import { Switch } from "@calcom/ui/components/form";
import { Section } from "@calcom/ui/components/section";
import type { appDataSchema } from "../zod";
@@ -22,6 +22,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
const { enabled, updateEnabled } = useIsAppEnabled(app);
const ignoreGuests = getAppData("ignoreGuests") ?? false;
const skipContactCreation = getAppData("skipContactCreation") ?? false;
return (
<AppCard
@@ -50,9 +51,24 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
/>
</Section.SubSectionHeader>
</Section.SubSection>
<Section.SubSection>
<Section.SubSectionHeader
icon="user-plus"
title={t("skip_contact_creation", { appName: "HubSpot" })}
labelFor="skip-contact-creation">
<Switch
size="sm"
labelOnLeading
checked={skipContactCreation}
onCheckedChange={(checked) => {
setAppData("skipContactCreation", checked);
}}
/>
</Section.SubSectionHeader>
</Section.SubSection>
</Section.Content>
</AppCard>
);
};
export default EventTypeAppCard;
export default EventTypeAppCard;
+1
View File
@@ -4,6 +4,7 @@ import { eventTypeAppCardZod } from "../eventTypeAppCardZod";
export const appDataSchema = eventTypeAppCardZod.extend({
ignoreGuests: z.boolean().optional(),
skipContactCreation: z.boolean().optional(),
});
export const appKeysSchema = z.object({