From 21aaff01fa538b9e4262cf1ed5b84b5a582833b3 Mon Sep 17 00:00:00 2001 From: Somay Chauhan Date: Wed, 6 Nov 2024 14:13:57 +0530 Subject: [PATCH] fix: disable all emails modal crash on platform (#17485) --- .../settings/DisableAllEmailsSetting.tsx | 82 ------------------- .../tabs/advanced/DisableAllEmailsSetting.tsx | 6 +- 2 files changed, 3 insertions(+), 85 deletions(-) delete mode 100644 apps/web/components/eventtype/settings/DisableAllEmailsSetting.tsx diff --git a/apps/web/components/eventtype/settings/DisableAllEmailsSetting.tsx b/apps/web/components/eventtype/settings/DisableAllEmailsSetting.tsx deleted file mode 100644 index 453967a087..0000000000 --- a/apps/web/components/eventtype/settings/DisableAllEmailsSetting.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import type { TFunction } from "next-i18next"; -import { Trans } from "next-i18next"; -import { useState } from "react"; - -import { - SettingsToggle, - Dialog, - DialogContent, - DialogFooter, - InputField, - DialogClose, - Button, -} from "@calcom/ui"; - -interface DisableEmailsSettingProps { - checked: boolean; - onCheckedChange: (e: boolean) => void; - recipient: "attendees" | "hosts"; - t: TFunction; -} - -export const DisableAllEmailsSetting = ({ - checked, - onCheckedChange, - recipient, - t, -}: DisableEmailsSettingProps) => { - const [dialogOpen, setDialogOpen] = useState(false); - const [confirmText, setConfirmText] = useState(""); - - const title = - recipient === "attendees" ? t("disable_all_emails_to_attendees") : t("disable_all_emails_to_hosts"); - - return ( -
- setDialogOpen(e)}> - -

- - This will disable all emails to {{ recipient }}. This includes booking confirmations, requests, - reschedules and reschedule requests, cancellation emails, and any other emails related to - booking updates. -
-
- It is your responsibility to ensure that your {{ recipient }} are aware of any bookings and - changes to their bookings. -
-

-

{t("type_confirm_to_continue")}

- { - setConfirmText(e.target.value); - }} - /> - - - - -
-
- { - checked ? onCheckedChange(!checked) : setDialogOpen(true); - }} - /> -
- ); -}; diff --git a/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx b/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx index 453967a087..fe41a90238 100644 --- a/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx +++ b/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx @@ -37,13 +37,13 @@ export const DisableAllEmailsSetting = ({

- This will disable all emails to {{ recipient }}. This includes booking confirmations, requests, + This will disable all emails to {recipient}. This includes booking confirmations, requests, reschedules and reschedule requests, cancellation emails, and any other emails related to booking updates.

- It is your responsibility to ensure that your {{ recipient }} are aware of any bookings and - changes to their bookings. + It is your responsibility to ensure that your {recipient} are aware of any bookings and changes + to their bookings.

{t("type_confirm_to_continue")}