From 8d736cfb67218e375053052d301436b6970f2b5e Mon Sep 17 00:00:00 2001 From: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Date: Thu, 10 Aug 2023 22:00:49 +0530 Subject: [PATCH] chore: add helper text in round robin (#10674) Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> --- .../web/components/eventtype/EventTeamTab.tsx | 19 +++++++++++++++++++ apps/web/public/static/locales/en/common.json | 2 ++ .../components/CheckedTeamSelect.tsx | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/web/components/eventtype/EventTeamTab.tsx b/apps/web/components/eventtype/EventTeamTab.tsx index 5767895389..7d170115ae 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; + helperText?: React.ReactNode | string; } & Omit>, "onChange" | "value">) => { return (
@@ -136,11 +140,24 @@ const CheckedHostField = ({ placeholder={placeholder} {...rest} /> + {helperText &&

{helperText}

}
); }; +const FixedHostHelper = ( + + Add anyone who needs to attend the event. + + Learn more + + +); + const RoundRobinHosts = ({ teamMembers, value, @@ -167,6 +184,7 @@ const RoundRobinHosts = ({ value={value} placeholder={t("add_fixed_hosts")} labelText={t("fixed_hosts")} + helperText={FixedHostHelper} /> ); diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index c4a0f6a904..e24213a3a8 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", + "fixed_host_helper": "Add anyone who needs to attend the event. <1>Learn more", + "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.tsx index 6cdc1ff1d4..930b3f466e 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*/}
    = 1 && "border-subtle border")} + className={classNames("mb-1 mt-3 rounded-md", value.length >= 1 && "border-subtle border")} ref={animationRef}> {value.map((option, index) => (