From d261a23dbc6c168cf2e5fca4b3e1896b20136dda Mon Sep 17 00:00:00 2001 From: Amit Sharma <74371312+Amit91848@users.noreply.github.com> Date: Fri, 26 Sep 2025 17:55:49 +0530 Subject: [PATCH] fix: Bunch of fixes and minor changes throughout the app (#23356) * Bunch of fixes and minor changes throughout the app * remove logs * fix: e2e * fix: e2e * fix: more e2e and design * revert insights upgrade change --- .../(main-nav)/teams/CTA.tsx | 1 + .../SettingsLayoutAppDirClient.tsx | 8 + .../__tests__/EditLocationDialog.test.tsx | 2 +- apps/web/modules/signup-view.tsx | 5 +- apps/web/playwright/event-types.e2e.ts | 13 +- apps/web/playwright/filter-helpers.ts | 2 +- .../playwright/fixtures/regularBookings.ts | 2 + .../web/playwright/managed-event-types.e2e.ts | 11 +- apps/web/public/static/locales/en/common.json | 20 +- packages/app-store/utils.ts | 2 +- packages/features/apps/components/AllApps.tsx | 2 +- packages/features/apps/components/AppCard.tsx | 7 +- .../filters/ColumnVisibilityButton.tsx | 6 +- .../segment/FilterSegmentSelect.tsx | 4 +- .../components/MakeTeamPrivateSwitch.tsx | 2 +- .../workflows/components/WorkflowListPage.tsx | 2 +- .../components/locations/CalVideoSettings.tsx | 245 ++++++++++-------- .../tabs/advanced/EventAdvancedTab.tsx | 91 ++++++- .../components/tabs/limits/EventLimitsTab.tsx | 12 + .../components/tabs/setup/EventSetupTab.tsx | 50 +--- .../features/form-builder/FormBuilder.tsx | 1 - .../schedules/components/ScheduleListItem.tsx | 2 +- .../wrappers/EventAdvancedWebWrapper.tsx | 2 + .../wrappers/EventTypeWebWrapper.tsx | 1 + .../navigation/tabs/VerticalTabItem.tsx | 2 +- 25 files changed, 300 insertions(+), 195 deletions(-) diff --git a/apps/web/app/(use-page-wrapper)/(main-nav)/teams/CTA.tsx b/apps/web/app/(use-page-wrapper)/(main-nav)/teams/CTA.tsx index 7043bd4652..8ec59602dd 100644 --- a/apps/web/app/(use-page-wrapper)/(main-nav)/teams/CTA.tsx +++ b/apps/web/app/(use-page-wrapper)/(main-nav)/teams/CTA.tsx @@ -11,6 +11,7 @@ export const TeamsCTA = () => { data-testid="new-team-btn" variant="fab" StartIcon="plus" + size="sm" type="button" href={`${WEBAPP_URL}/settings/teams/new?returnTo=${WEBAPP_URL}/teams`}> {t("new")} diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx index 88954141e9..df73593f68 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx @@ -438,6 +438,7 @@ const TeamListCollapsible = ({ teamFeatures }: { teamFeatures?: Record )} @@ -445,6 +446,7 @@ const TeamListCollapsible = ({ teamFeatures }: { teamFeatures?: Record {/* Show roles only for sub-teams with PBAC-enabled parent */} @@ -465,6 +467,7 @@ const TeamListCollapsible = ({ teamFeatures }: { teamFeatures?: Record {/* Hide if there is a parent ID */} @@ -474,6 +477,7 @@ const TeamListCollapsible = ({ teamFeatures }: { teamFeatures?: Record @@ -482,6 +486,7 @@ const TeamListCollapsible = ({ teamFeatures }: { teamFeatures?: Record @@ -643,6 +648,7 @@ const SettingsSidebarContainer = ({ name={t("add_a_team")} href={`${WEBAPP_URL}/settings/teams/new`} textClassNames="px-3 items-center mt-2 text-emphasis font-medium text-sm" + className="me-5 h-7 w-auto !px-2" icon="plus" disableChevron /> @@ -744,12 +750,14 @@ const SettingsSidebarContainer = ({ name={t("profile")} href={`/settings/organizations/teams/other/${otherTeam.id}/profile`} textClassNames="px-3 text-emphasis font-medium text-sm" + className="me-5 h-7 w-auto !px-2" disableChevron /> <> diff --git a/apps/web/components/dialog/__tests__/EditLocationDialog.test.tsx b/apps/web/components/dialog/__tests__/EditLocationDialog.test.tsx index 1d5243ae30..1aa1da9f87 100644 --- a/apps/web/components/dialog/__tests__/EditLocationDialog.test.tsx +++ b/apps/web/components/dialog/__tests__/EditLocationDialog.test.tsx @@ -81,7 +81,7 @@ describe("EditLocationDialog", () => { }, { value: "integrations:daily", - label: "Cal Video (Global)", + label: "Cal Video (Default)", disabled: false, icon: "/app-store/dailyvideo/icon.svg", slug: "daily-video", diff --git a/apps/web/modules/signup-view.tsx b/apps/web/modules/signup-view.tsx index c889827d15..712bbfec84 100644 --- a/apps/web/modules/signup-view.tsx +++ b/apps/web/modules/signup-view.tsx @@ -426,6 +426,7 @@ export default function Signup({ id="signup-email" {...register("email")} label={t("email")} + placeholder="john@doe.com" type="email" autoComplete="email" disabled={prepopulateFormValues?.email} @@ -522,8 +523,8 @@ export default function Signup({ usernameTaken }> {premiumUsername && !usernameTaken - ? `${t("create_account")} (${getPremiumPlanPriceValue()})` - : t("create_account")} + ? `${t("get_started")} (${getPremiumPlanPriceValue()})` + : t("get_started")} )} diff --git a/apps/web/playwright/event-types.e2e.ts b/apps/web/playwright/event-types.e2e.ts index 34beac1a57..ec8ec3a3cb 100644 --- a/apps/web/playwright/event-types.e2e.ts +++ b/apps/web/playwright/event-types.e2e.ts @@ -239,7 +239,7 @@ test.describe("Event Types tests", () => { await gotoFirstEventType(page); await page.getByTestId("location-select").click(); - await page.locator(`text="Cal Video (Global)"`).click(); + await page.locator(`text="Cal Video (Default)"`).click(); await saveEventType(page); await gotoBookingPage(page); @@ -282,7 +282,7 @@ test.describe("Event Types tests", () => { await selectAttendeePhoneNumber(page); // Add Cal Video location - await addAnotherLocation(page, "Cal Video (Global)"); + await addAnotherLocation(page, "Cal Video (Default)"); await saveEventType(page); @@ -496,6 +496,9 @@ test.describe("Event Types tests", () => { }); await test.step("should open first eventType and check Interface Language", async () => { await gotoFirstEventType(page); + // Go to Advanced tab + await page.click("[data-testid=vertical-tab-event_advanced_tab_title]"); + await page.click("[data-testid=event-interface-language-toggle]"); const interfaceLanguageValue = page .getByTestId("event-interface-language") .locator('div[class$="-singleValue"]'); @@ -518,6 +521,9 @@ test.describe("Event Types tests", () => { await test.step("should open first eventType and change Interface Language to Deutsche", async () => { await gotoFirstEventType(page); + // Go to Advanced tab and enable offerSeats + await page.click("[data-testid=vertical-tab-event_advanced_tab_title]"); + await page.click("[data-testid=event-interface-language-toggle]"); await page.getByTestId("event-interface-language").click(); await page.locator(`text="Deutsch"`).click(); await saveEventType(page); @@ -574,6 +580,9 @@ test.describe("Event Types tests", () => { await page.goto("/event-types"); await page.waitForSelector('[data-testid="event-types"]'); await gotoFirstEventType(page); + // Go to Advanced tab and enable offerSeats + await page.click("[data-testid=vertical-tab-event_advanced_tab_title]"); + await page.click("[data-testid=event-interface-language-toggle]"); await page.getByTestId("event-interface-language").click(); await page.getByTestId("select-option-es").click(); await saveEventType(page); diff --git a/apps/web/playwright/filter-helpers.ts b/apps/web/playwright/filter-helpers.ts index 70b07e3782..e0d24dbe08 100644 --- a/apps/web/playwright/filter-helpers.ts +++ b/apps/web/playwright/filter-helpers.ts @@ -198,7 +198,7 @@ export async function expectSegmentCleared(page: Page) { // Check that no segment is selected (button shows default text) const segmentSelect = page.getByTestId("filter-segment-select"); const buttonText = await segmentSelect.textContent(); - expect(buttonText?.trim()).toEqual("Segment"); + expect(buttonText?.trim()).toEqual("Saved filters"); } /** diff --git a/apps/web/playwright/fixtures/regularBookings.ts b/apps/web/playwright/fixtures/regularBookings.ts index 0f4370073a..bf5df1496e 100644 --- a/apps/web/playwright/fixtures/regularBookings.ts +++ b/apps/web/playwright/fixtures/regularBookings.ts @@ -199,6 +199,7 @@ export function createBookingPageFixture(page: Page) { await expect(eventTypePage.getByTestId("time")).toHaveCount(count); }, getAITranslationToggleDisabled: async () => { + await page.click("[data-testid=vertical-tab-event_advanced_tab_title]"); await page.waitForSelector('[data-testid="ai_translation_toggle"]', { timeout: 5000, state: "attached", @@ -207,6 +208,7 @@ export function createBookingPageFixture(page: Page) { return (await toggle.getAttribute("disabled")) !== null; }, toggleAITranslation: async () => { + await page.click("[data-testid=vertical-tab-event_advanced_tab_title]"); await page.getByTestId("ai_translation_toggle").click(); }, updateEventTypeDescription: async (description: string) => { diff --git a/apps/web/playwright/managed-event-types.e2e.ts b/apps/web/playwright/managed-event-types.e2e.ts index 1c9e9e3383..8c4e265999 100644 --- a/apps/web/playwright/managed-event-types.e2e.ts +++ b/apps/web/playwright/managed-event-types.e2e.ts @@ -81,10 +81,13 @@ test.describe("Managed Event Types", () => { await page.goto(`/event-types/${managedEvent.id}?tabName=setup`); await expect(page.getByTestId("vertical-tab-basics")).toHaveAttribute("aria-current", "page"); // fix the race condition await expect(page.getByTestId("vertical-tab-basics")).toContainText("Basics"); //fix the race condition + await page.locator("#location-select").click(); - const optionText = await getByKey(page, "organizer_default_conferencing_app"); - await expect(optionText).toBeVisible(); - await optionText.click(); + const targetText = (await localize("en"))("organizer_default_conferencing_app"); + const options = page.locator('[data-testid="location-select-item-conferencing"]'); + const targetOption = options.locator(`text=${targetText}`); + await expect(targetOption).toBeVisible(); + await targetOption.click(); await saveAndWaitForResponse(page); await page.getByTestId("vertical-tab-assignment").click(); @@ -190,7 +193,7 @@ test.describe("Managed Event Types", () => { }); const MANAGED_EVENT_TABS: { slug: string; locator: (page: Page) => Locator | Promise }[] = [ - { slug: "setup", locator: (page) => getByKey(page, "translate_description_button") }, + { slug: "setup", locator: (page) => getByKey(page, "allow_multiple_durations") }, { slug: "team", locator: (page) => getByKey(page, "automatically_add_all_team_members"), diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index df29e2f716..51aae893ad 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -321,6 +321,7 @@ "secret_meeting": "Secret Meeting", "login_instead": "Login instead", "create_account": "Create Account", + "get_started": "Get started", "confirm_password": "Confirm password", "reset_your_password": "Set your new password with the instructions sent to your email address.", "org_banner_instructions": "Please upload image of {{width}} width and {{height}} height.", @@ -958,7 +959,7 @@ "light_event_type_color": "Event Type Color (Light Theme)", "dark_event_type_color": "Event Type Color (Dark Theme)", "file_not_named": "File is not named [idOrSlug]/[user]", - "create_team": "Create Team", + "create_team": "Create team", "name": "Name", "nameless_team": "Nameless Team", "oauth_clients": "OAuth Clients", @@ -1019,6 +1020,7 @@ "attendees": "Attendees", "add_attendees": "Add attendees", "show_advanced_settings": "Show advanced settings", + "hide_advanced_settings": "Hide advanced settings", "event_name": "Event Name", "event_name_in_calendar": "Calendar event name", "event_name_tooltip": "The name that will appear in calendars", @@ -1231,7 +1233,7 @@ "contact_sales": "Contact Sales", "error_404": "Error 404", "default": "Default", - "set_to_default": "Set to Default", + "set_to_default": "Set as Default", "new_schedule_btn": "New schedule", "add_new_schedule": "Add a new schedule", "add_new_calendar": "Add a new calendar", @@ -1329,7 +1331,7 @@ "make_team_private_description": "Your team members won't be able to see other team members when this is turned on.", "you_cannot_see_team_members": "You cannot see all the team members of a private team.", "you_cannot_see_teams_of_org": "You cannot see teams of a private organization.", - "allow_booker_to_select_duration": "Allow booker to select from multiple durations", + "allow_multiple_durations": "Allow multiple durations", "impersonate_user_tip": "All uses of this feature is audited.", "impersonating_user_warning": "Impersonating username \"{{user}}\".", "impersonating_stop_instructions": "Click here to stop", @@ -2689,7 +2691,7 @@ "enterprise": "Enterprise", "enterprise_description": "Upgrade to Enterprise to create your Organization", "create_your_org": "Create your Organization", - "create_org": "Create Organization", + "create_org": "Create organization", "create_your_org_description": "Upgrade to Organizations and receive a subdomain, unified billing, Insights, extensive whitelabeling and more", "create_your_enterprise_description": "Upgrade to Enterprise and get access to Active Directory Sync, SCIM Automatic User provisioning, Cal.ai Voice Agents, Admin APIs and more!", "other_payment_app_enabled": "You can only enable one payment app per event type", @@ -2923,6 +2925,7 @@ "proceeding_agreement": "By proceeding, you agree to our", "terms": "Terms", "always_show_x_days": "Always {{x}} days available", + "always_show_x_days_description": "Automatically moves the {{x}}-day booking window forward each day, ensuring your calendar always shows the next {{x}} days of available slots.", "team_subscription_cancelled_successfully": "Team subscription cancelled successfully", "team_subscription_cancellation_error": "Error while cancelling the team subscription", "unable_to_subscribe_to_the_platform": "An error occurred while trying to subscribe to the platform plan, please try again later", @@ -3144,7 +3147,8 @@ "filter_operator_ends_with": "Ends with", "filter_operator_is_empty": "Is empty", "filter_operator_not_empty": "Not empty", - "translate_description_button": "Translate title/description to the visitor's browser language using AI", + "translate_description_button": "Auto translate title and description", + "translate_description_button_description": "Automatically translate titles and descriptions to the visitor’s browser language using AI.", "rr_distribution_method": "Distribution", "rr_distribution_method_description": "Allows for optimising distribution for maximum availability or to aim for a more balanced assignment.", "rr_distribution_method_availability_title": "Maximize availability", @@ -3310,6 +3314,7 @@ "seats_doesnt_support_recurring": "Seats feature doesn't support recurring event. Disable seats feature to make it recurring.", "recurring_event_seats_error": "Recurring event doesn't support seats feature. Disable seats feature or make the event non-recurring.", "segment": "Segment", + "saved_filters": "Saved filters", "rename": "Rename", "rename_segment": "Rename Segment", "delete_segment": "Delete Segment", @@ -3339,6 +3344,7 @@ "picklist": "Picklist", "most_cancelled_bookings": "Most Cancelled", "interface_language": "Interface Language", + "interface_language_description": "Set your preferred language for the booking interface", "visitors_browser_language": "Visitor's browser language", "name_or_email": "Name or Email", "salesforce_round_robin_skip_fallback_to_lead_owner": "If no contact is found, fallback to lead owner if it exists", @@ -3571,8 +3577,8 @@ "rr_load_balancing_disabled_with_groups": "Load Balancing is not available with Round Robin Groups", "round_robin_settings_description": "Customize the default round robin settings for this team", "round_robin_settings_updated_successfully": "Round Robin settings updated successfully", - "booking_creation_time": "Booking Creation Time", - "meeting_start_time": "Meeting Start Time", + "booking_creation_time": "Booking creation time", + "meeting_start_time": "Meeting start time", "members_affected_by_disabling_delegation_credential": "Affected members", "no_members_affected_by_disabling_delegation_credential": "No members affected by disabling delegation credential", "download_expense_log": "Download Expense Log", diff --git a/packages/app-store/utils.ts b/packages/app-store/utils.ts index 4513188940..57f86594f9 100644 --- a/packages/app-store/utils.ts +++ b/packages/app-store/utils.ts @@ -68,7 +68,7 @@ function getApps(credentials: CredentialDataWithTeamName[], filterOnCredentials? delegatedToId: null, delegationCredentialId: null, team: { - name: "Global", + name: "Default", }, }; logger.debug( diff --git a/packages/features/apps/components/AllApps.tsx b/packages/features/apps/components/AllApps.tsx index 0fc8093632..5acd9e64b2 100644 --- a/packages/features/apps/components/AllApps.tsx +++ b/packages/features/apps/components/AllApps.tsx @@ -123,7 +123,7 @@ function CategoryTab({ selectedCategory, categories, searchText, onCategoryChang selectedCategory === cat ? "bg-emphasis text-default" : "bg-muted text-emphasis", "hover:bg-emphasis rounded-md px-4 py-2.5 text-sm font-medium transition hover:cursor-pointer" )}> - {cat[0].toUpperCase() + cat.slice(1)} + {cat === "crm" ? cat.toUpperCase() : cat[0].toUpperCase() + cat.slice(1)} ))} diff --git a/packages/features/apps/components/AppCard.tsx b/packages/features/apps/components/AppCard.tsx index 4eb8973bf2..06715cba2c 100644 --- a/packages/features/apps/components/AppCard.tsx +++ b/packages/features/apps/components/AppCard.tsx @@ -19,6 +19,7 @@ import { Badge } from "@calcom/ui/components/badge"; import { Button } from "@calcom/ui/components/button"; import type { ButtonProps } from "@calcom/ui/components/button"; import { showToast } from "@calcom/ui/components/toast"; +import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML"; interface AppCardProps { app: App; @@ -119,14 +120,14 @@ export function AppCard({ app, credentials, searchText, userAdminTeams }: AppCar */}

- {app.description} -

+ }}/>
- + {segmentGroups.length === 0 &&

{t("no_segments")}

} {segmentGroups.map((group, index) => ( diff --git a/packages/features/ee/teams/components/MakeTeamPrivateSwitch.tsx b/packages/features/ee/teams/components/MakeTeamPrivateSwitch.tsx index ab0551668f..c412e18e2f 100644 --- a/packages/features/ee/teams/components/MakeTeamPrivateSwitch.tsx +++ b/packages/features/ee/teams/components/MakeTeamPrivateSwitch.tsx @@ -45,7 +45,7 @@ const MakeTeamPrivateSwitch = ({ setTeamPrivate(checked); mutation.mutate({ id: teamId, isPrivate: checked }); }} - switchContainerClassName="my-6" + switchContainerClassName="mt-6" data-testid="make-team-private-check" /> diff --git a/packages/features/ee/workflows/components/WorkflowListPage.tsx b/packages/features/ee/workflows/components/WorkflowListPage.tsx index 4545bafbd6..bab32ccaab 100644 --- a/packages/features/ee/workflows/components/WorkflowListPage.tsx +++ b/packages/features/ee/workflows/components/WorkflowListPage.tsx @@ -229,7 +229,7 @@ export default function WorkflowListPage({ workflows }: Props) {
{workflow.team?.name && ( - + { const { t } = useLocale(); const formMethods = useFormContext(); const isPlatform = useIsPlatform(); + const [isExpanded, setIsExpanded] = useState(false); + const [parent] = useAutoAnimate(); return ( - - { - return ( - } + <> + + + +
+ {isExpanded && ( + + { + return ( + } + /> + ); + }} /> - ); - }} - /> - { - return ( - } + { + return ( + } + /> + ); + }} /> - ); - }} - /> - {!isPlatform && ( - { - return ( - } + {!isPlatform && ( + { + return ( + } + /> + ); + }} /> - ); - }} - /> - )} + )} - { - return ( - } + { + return ( + } + /> + ); + }} /> - ); - }} - /> - {!isPlatform && ( - { - return ( - } + {!isPlatform && ( + { + return ( + } + /> + ); + }} /> - ); - }} - /> - )} - {!isPlatform && ( - { - return ( - } + )} + {!isPlatform && ( + { + return ( + } + /> + ); + }} /> - ); - }} - /> - )} + )} - (!v || v.trim() === "" ? null : v), - })} - /> - - + (!v || v.trim() === "" ? null : v), + })} + /> + + + )} +
+ ); }; diff --git a/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx b/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx index faf9a7868e..97297122e7 100644 --- a/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx +++ b/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx @@ -60,6 +60,7 @@ import { CheckboxField, Switch, SettingsToggle, + Select, } from "@calcom/ui/components/form"; import { Icon } from "@calcom/ui/components/icon"; @@ -120,6 +121,7 @@ export type EventAdvancedBaseProps = Pick; isUserLoading?: boolean; showToast: (message: string, variant: "success" | "warning" | "error") => void; + orgId: number | null; customClassNames?: EventAdvancedTabCustomClassNames; }; @@ -130,6 +132,7 @@ export type EventAdvancedTabProps = EventAdvancedBaseProps & { error: unknown; }; showBookerLayoutSelector: boolean; + localeOptions?: { value: string; label: string }[]; verifiedEmails?: string[]; }; @@ -253,6 +256,11 @@ const destinationCalendarComponents = { />
)} + {!showConnectedCalendarSettings && ( +

+ {t("add_to_calendar")} +

+ )} {!useEventTypeDestinationCalendarEmail && verifiedSecondaryEmails.length > 0 && !isTeamEventType && ( @@ -411,6 +419,8 @@ export const EventAdvancedTab = ({ showBookerLayoutSelector, customClassNames, verifiedEmails, + orgId, + localeOptions, }: EventAdvancedTabProps) => { const isPlatform = useIsPlatform(); const platformContext = useAtomsContext(); @@ -423,6 +433,9 @@ export const EventAdvancedTab = ({ !!formMethods.getValues("multiplePrivateLinks") && formMethods.getValues("multiplePrivateLinks")?.length !== 0 ); + const [interfaceLanguageVisible, setInterfaceLanguageVisible] = useState( + !!formMethods.getValues("interfaceLanguage") + ); const [redirectUrlVisible, setRedirectUrlVisible] = useState(!!formMethods.getValues("successRedirectUrl")); const bookingFields: Prisma.JsonObject = {}; @@ -457,6 +470,10 @@ export const EventAdvancedTab = ({ formMethods.getValues("metadata")?.apps?.stripe?.paymentOption === "HOLD"; const isRecurringEvent = !!formMethods.getValues("recurringEvent"); + const interfaceLanguageOptions = + localeOptions && localeOptions.length > 0 + ? [{ label: t("visitors_browser_language"), value: "" }, ...localeOptions] + : []; const isRoundRobinEventType = eventType.schedulingType && eventType.schedulingType === SchedulingType.ROUND_ROBIN; @@ -481,11 +498,12 @@ export const EventAdvancedTab = ({ ); }; - const { isChildrenManagedEventType, isManagedEventType, shouldLockDisableProps } = useLockedFieldsManager({ - eventType, - translate: t, - formMethods, - }); + const { isChildrenManagedEventType, isManagedEventType, shouldLockDisableProps, shouldLockIndicator } = + useLockedFieldsManager({ + eventType, + translate: t, + formMethods, + }); const eventNamePlaceholder = getEventName({ ...eventNameObject, eventName: formMethods.watch("eventName"), @@ -726,6 +744,69 @@ export const EventAdvancedTab = ({ /> )} /> + {!isPlatform && ( + ( + onChange(e)} + disabled={!orgId} + tooltip={!orgId ? t("orgs_upgrade_to_enable_feature") : undefined} + data-testid="ai_translation_toggle" + toggleSwitchAtTheEnd={true} + switchContainerClassName="border-subtle rounded-lg border py-6 px-4 sm:px-6" + description={t("translate_description_button_description")} + /> + )} + /> + )} + {!isPlatform && ( + ( + { + setInterfaceLanguageVisible(e); + if (!e) { + // disables the setting + formMethods.setValue("interfaceLanguage", null, { shouldDirty: true }); + } else { + // "" is default value which means visitors browser language + formMethods.setValue("interfaceLanguage", "", { shouldDirty: true }); + } + }}> +
+ + data-testid="event-interface-language" + className="capitalize" + options={interfaceLanguageOptions} + onChange={(option) => { + onChange(option?.value); + }} + value={interfaceLanguageOptions.find((option) => option.value === value)} + /> +
+
+ )} + /> + )} ( diff --git a/packages/features/eventtypes/components/tabs/limits/EventLimitsTab.tsx b/packages/features/eventtypes/components/tabs/limits/EventLimitsTab.tsx index 4145e046e6..0ea2007525 100644 --- a/packages/features/eventtypes/components/tabs/limits/EventLimitsTab.tsx +++ b/packages/features/eventtypes/components/tabs/limits/EventLimitsTab.tsx @@ -31,6 +31,8 @@ import { } from "@calcom/ui/components/form"; import MaxActiveBookingsPerBookerController from "./MaxActiveBookingsPerBookerController"; +import { Tooltip } from "@calcom/ui/components/tooltip"; +import { Icon } from "@calcom/ui/components/icon"; type IPeriodType = (typeof PeriodType)[keyof typeof PeriodType]; @@ -248,6 +250,7 @@ function RollingLimitRadioItem({  {t("into_the_future")}
+
+ + + +
diff --git a/packages/features/eventtypes/components/tabs/setup/EventSetupTab.tsx b/packages/features/eventtypes/components/tabs/setup/EventSetupTab.tsx index 02bd706da1..2ccf44cfb2 100644 --- a/packages/features/eventtypes/components/tabs/setup/EventSetupTab.tsx +++ b/packages/features/eventtypes/components/tabs/setup/EventSetupTab.tsx @@ -72,18 +72,12 @@ export const EventSetupTab = ( const formMethods = useFormContext(); const { eventType, team, urlPrefix, hasOrgBranding, customClassNames, orgId } = props; - const interfaceLanguageOptions = - props.localeOptions && props.localeOptions.length > 0 - ? [{ label: t("visitors_browser_language"), value: "" }, ...props.localeOptions] - : []; - const [multipleDuration, setMultipleDuration] = useState( formMethods.getValues("metadata")?.multipleDuration ); const [firstRender, setFirstRender] = useState(true); const seatsEnabled = formMethods.watch("seatsPerTimeSlotEnabled"); - const autoTranslateDescriptionEnabled = formMethods.watch("autoTranslateDescriptionEnabled"); const multipleDurationOptions = [ 5, 10, 15, 20, 25, 30, 45, 50, 60, 75, 80, 90, 120, 150, 180, 240, 300, 360, 420, 480, @@ -161,48 +155,6 @@ export const EventSetupTab = ( )} - {!isPlatform && ( -
- { - formMethods.setValue("autoTranslateDescriptionEnabled", value, { shouldDirty: true }); - }} - disabled={!orgId} - tooltip={!orgId ? t("orgs_upgrade_to_enable_feature") : undefined} - data-testid="ai_translation_toggle" - /> -
- )} - {!isPlatform && interfaceLanguageOptions.length > 0 && ( -
- - {t("interface_language")} - {shouldLockIndicator("interfaceLanguage")} - - ( - - data-testid="event-interface-language" - className="capitalize" - options={interfaceLanguageOptions} - onChange={(option) => { - onChange(option?.value); - }} - value={interfaceLanguageOptions.find((option) => option.value === value)} - /> - )} - /> -
- )} { fieldForm.setValue("variant", checked ? otherVariant : defaultVariant); }} - classNames={{ container: "mt-2" }} tooltip={t("Toggle Variant")} /> ) : ( diff --git a/packages/features/schedules/components/ScheduleListItem.tsx b/packages/features/schedules/components/ScheduleListItem.tsx index 2a2e2df448..417f939c09 100644 --- a/packages/features/schedules/components/ScheduleListItem.tsx +++ b/packages/features/schedules/components/ScheduleListItem.tsx @@ -51,7 +51,7 @@ export function ScheduleListItem({
{schedule.name} {schedule.isDefault && ( - + {t("default")} )} diff --git a/packages/platform/atoms/event-types/wrappers/EventAdvancedWebWrapper.tsx b/packages/platform/atoms/event-types/wrappers/EventAdvancedWebWrapper.tsx index de2dfb1f29..5d67a53ea1 100644 --- a/packages/platform/atoms/event-types/wrappers/EventAdvancedWebWrapper.tsx +++ b/packages/platform/atoms/event-types/wrappers/EventAdvancedWebWrapper.tsx @@ -1,6 +1,7 @@ import type { EventAdvancedBaseProps } from "@calcom/features/eventtypes/components/tabs/advanced/EventAdvancedTab"; import { EventAdvancedTab } from "@calcom/features/eventtypes/components/tabs/advanced/EventAdvancedTab"; import { trpc } from "@calcom/trpc/react"; +import { localeOptions } from "@calcom/lib/i18n"; const EventAdvancedWebWrapper = ({ ...props }: EventAdvancedBaseProps) => { const connectedCalendarsQuery = trpc.viewer.calendars.connectedCalendars.useQuery(); @@ -17,6 +18,7 @@ const EventAdvancedWebWrapper = ({ ...props }: EventAdvancedBaseProps) => { }} showBookerLayoutSelector={true} verifiedEmails={verifiedEmails} + localeOptions={localeOptions} /> ); }; diff --git a/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx b/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx index d5f3c87090..e8a7d125b0 100644 --- a/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx +++ b/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx @@ -282,6 +282,7 @@ const EventTypeWeb = ({ user={user} isUserLoading={isLoggedInUserPending} showToast={showToast} + orgId={orgBranding?.id ?? null} /> ), instant: , diff --git a/packages/ui/components/navigation/tabs/VerticalTabItem.tsx b/packages/ui/components/navigation/tabs/VerticalTabItem.tsx index 179048ccdd..2d3da4b7c6 100644 --- a/packages/ui/components/navigation/tabs/VerticalTabItem.tsx +++ b/packages/ui/components/navigation/tabs/VerticalTabItem.tsx @@ -62,7 +62,7 @@ const VerticalTabItem = ({ target={props.isExternalLink ? "_blank" : "_self"} className={classNames( props.textClassNames || "text-default text-sm font-medium leading-none", - "hover:bg-subtle [&[aria-current='page']]:bg-subtle [&[aria-current='page']]:text-emphasis group-hover:text-default group flex w-full flex-row items-center rounded-md p-2 transition", + "hover:bg-subtle [&[aria-current='page']]:bg-subtle [&[aria-current='page']]:text-emphasis group-hover:text-default group flex w-full flex-row items-center rounded-md p-2 transition ", props.disabled && "pointer-events-none !opacity-30", (isChild || !props.icon) && "ml-7", props.className