Scheduling infrastructure for absolutely everyone.
chore: add helper text in round robin (#10674)
Udit Takkar8d736cfb6721
diff --git a/apps/web/components/eventtype/EventTeamTab.tsx b/apps/web/components/eventtype/EventTeamTab.tsxindex 5767895389f..7d170115ae0 100644--- a/apps/web/components/eventtype/EventTeamTab.tsx+++ b/apps/web/components/eventtype/EventTeamTab.tsx@@ -1,3 +1,5 @@+import { Trans } from "next-i18next";+import Link from "next/link";import type { EventTypeSetupProps, FormValues } from "pages/event-types/[type]";import { useEffect, useRef } from "react";import type { ComponentProps } from "react";@@ -99,6 +101,7 @@ const CheckedHostField = ({isFixed,value,onChange,+ helperText,...rest}: {labelText: string;@@ -107,6 +110,7 @@ const CheckedHostField = ({value: { isFixed: boolean; userId: number }[];onChange?: (options: { isFixed: boolean; userId: number }[]) => void;options?: Options<CheckedSelectOption>;+ helperText?: React.ReactNode | string;} & Omit<Partial<ComponentProps<typeof CheckedTeamSelect>>, "onChange" | "value">) => {return (<div className="bg-muted flex flex-col space-y-5 p-4">@@ -136,11 +140,24 @@ const CheckedHostField = ({placeholder={placeholder}{...rest}/>+ {helperText && <p className="text-subtle text-sm">{helperText}</p>}</div></div>);};+const FixedHostHelper = (+ <Trans i18nKey="fixed_host_helper">+ Add anyone who needs to attend the event.+ <Link+ className="underline underline-offset-2"+ target="_blank"+ href="https://cal.com/docs/enterprise-features/teams/round-robin-scheduling#fixed-hosts">+ Learn more+ </Link>+ </Trans>+);+const RoundRobinHosts = ({teamMembers,value,@@ -167,6 +184,7 @@ const RoundRobinHosts = ({value={value}placeholder={t("add_fixed_hosts")}labelText={t("fixed_hosts")}+ helperText={FixedHostHelper}/><CheckedHostFieldoptions={teamMembers.sort(sortByLabel)}@@ -175,6 +193,7 @@ const RoundRobinHosts = ({isFixed={false}placeholder={t("add_attendees")}labelText={t("round_robin_hosts")}+ helperText={t("round_robin_helper")}/></>);diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.jsonindex c4a0f6a9045..e24213a3a87 100644--- a/apps/web/public/static/locales/en/common.json+++ b/apps/web/public/static/locales/en/common.json@@ -256,6 +256,8 @@"available_apps": "Available Apps","available_apps_lower_case": "Available apps","available_apps_desc": "You have no apps installed. View popular apps below and explore more in our <1>App Store</1>",+ "fixed_host_helper": "Add anyone who needs to attend the event. <1>Learn more</1>",+ "round_robin_helper":"People in the group take turns and only one person will show up for the event.","check_email_reset_password": "Check your email. We sent you a link to reset your password.","finish": "Finish","organization_general_description": "Manage settings for your team language and timezone",diff --git a/packages/features/eventtypes/components/CheckedTeamSelect.tsx b/packages/features/eventtypes/components/CheckedTeamSelect.tsxindex 6cdc1ff1d43..930b3f466e9 100644--- a/packages/features/eventtypes/components/CheckedTeamSelect.tsx+++ b/packages/features/eventtypes/components/CheckedTeamSelect.tsx@@ -39,7 +39,7 @@ export const CheckedTeamSelect = ({{/* This class name conditional looks a bit odd but it allows a seemless transition when using autoanimate- Slides down from the top instead of just teleporting in from nowhere*/}<ul- className={classNames("mt-3 rounded-md", value.length >= 1 && "border-subtle border")}+ className={classNames("mb-1 mt-3 rounded-md", value.length >= 1 && "border-subtle border")}ref={animationRef}>{value.map((option, index) => (<li