diff --git a/apps/web/components/eventtype/RequiresConfirmationController.tsx b/apps/web/components/eventtype/RequiresConfirmationController.tsx index bc628b9be0af0..f2e78a7e1de10 100644 --- a/apps/web/components/eventtype/RequiresConfirmationController.tsx +++ b/apps/web/components/eventtype/RequiresConfirmationController.tsx @@ -9,7 +9,7 @@ import type z from "zod"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils"; -import { Alert, Input, Label, SettingsToggle } from "@calcom/ui"; +import { Input, Label, SettingsToggle } from "@calcom/ui"; type RequiresConfirmationControllerProps = { metadata: z.infer; @@ -39,118 +39,116 @@ export default function RequiresConfirmationController({ return (
-
- {seatsEnabled ? ( - - ) : ( - ( - { - formMethods.setValue("requiresConfirmation", val); - onRequiresConfirmation(val); - }}> - + ( + { + formMethods.setValue("requiresConfirmation", val); + onRequiresConfirmation(val); + }}> + { + if (val === "always") { + formMethods.setValue("requiresConfirmation", true); + onRequiresConfirmation(true); + formMethods.setValue("metadata.requiresConfirmationThreshold", undefined); + setRequiresConfirmationSetup(undefined); + } else if (val === "notice") { + formMethods.setValue("requiresConfirmation", true); + onRequiresConfirmation(true); + formMethods.setValue( + "metadata.requiresConfirmationThreshold", + requiresConfirmationSetup || defaultRequiresConfirmationSetup + ); } - onValueChange={(val) => { - if (val === "always") { - formMethods.setValue("requiresConfirmation", true); - onRequiresConfirmation(true); - formMethods.setValue("metadata.requiresConfirmationThreshold", undefined); - setRequiresConfirmationSetup(undefined); - } else if (val === "notice") { - formMethods.setValue("requiresConfirmation", true); - onRequiresConfirmation(true); - formMethods.setValue( - "metadata.requiresConfirmationThreshold", - requiresConfirmationSetup || defaultRequiresConfirmationSetup - ); - } - }}> -
-
- - - - -
-
- - - -
- ), - }} - /> - -
+ }}> +
+
+ + + + +
+
+ + + +
+ ), + }} + /> +
-
-
- )} - /> - )} +
+ + + )} + />
); diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index ff4ffc8a34dc9..bb7503ac04772 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -110,6 +110,7 @@ "hidden_team_owner_message": "You need a pro account to use teams, you are hidden until you upgrade.", "link_expires": "p.s. It expires in {{expiresIn}} hours.", "upgrade_to_per_seat": "Upgrade to Per-Seat", + "seat_options_doesnt_support_confirmation":"Seats option doesn't support confirmation requirement", "team_upgrade_seats_details": "Of the {{memberCount}} members in your team, {{unpaidCount}} seat(s) are unpaid. At ${{seatPrice}}/month per seat the estimated total cost of your membership is ${{totalCost}}/month.", "team_upgrade_banner_description": "Thank you for trialing our new team plan. We noticed your team \"{{teamName}}\" needs to be upgraded.", "team_upgrade_banner_action": "Upgrade here", diff --git a/packages/ui/components/form/switch/SettingsToggle.tsx b/packages/ui/components/form/switch/SettingsToggle.tsx index a18fce67bfdb1..d4474a412f303 100644 --- a/packages/ui/components/form/switch/SettingsToggle.tsx +++ b/packages/ui/components/form/switch/SettingsToggle.tsx @@ -12,6 +12,7 @@ type Props = { disabled?: boolean; onCheckedChange?: (checked: boolean) => void; "data-testid"?: string; + tooltip?: string; }; function SettingsToggle({ @@ -21,6 +22,7 @@ function SettingsToggle({ title, children, disabled, + tooltip, ...rest }: Props) { const [animateRef] = useAutoAnimate(); @@ -36,9 +38,10 @@ function SettingsToggle({ checked={checked} onCheckedChange={onCheckedChange} disabled={disabled} + tooltip={tooltip} /> -
+
{description &&

{description}

}