Scheduling infrastructure for absolutely everyone.
feat: add skipContactCreation toggle to EventTypeAppCard component (#25756)
Pallav3cadf105d502
diff --git a/packages/app-store/hubspot/components/EventTypeAppCardInterface.tsx b/packages/app-store/hubspot/components/EventTypeAppCardInterface.tsxindex 767b5a55eeb..4b529c67218 100644--- a/packages/app-store/hubspot/components/EventTypeAppCardInterface.tsx+++ b/packages/app-store/hubspot/components/EventTypeAppCardInterface.tsx@@ -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;\ No newline at end of file+export default EventTypeAppCard;diff --git a/packages/app-store/hubspot/zod.ts b/packages/app-store/hubspot/zod.tsindex 64732e0740c..2e173c3143a 100644--- a/packages/app-store/hubspot/zod.ts+++ b/packages/app-store/hubspot/zod.ts@@ -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({