Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/web/pages/v2/event-types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import EventTypeDescription from "@components/eventtype/EventTypeDescription";
import SkeletonLoader from "@components/eventtype/SkeletonLoader";
import Avatar from "@components/ui/Avatar";
import AvatarGroup from "@components/ui/AvatarGroup";
import NoCalendarConnectedAlert from "@components/ui/NoCalendarConnectedAlert";

import { TRPCClientError } from "@trpc/react";

Expand Down Expand Up @@ -551,6 +552,7 @@ const WithQuery = withQuery(["viewer.eventTypes"]);

const EventTypesPage = () => {
const { t } = useLocale();

return (
<div>
<Head>
Expand Down Expand Up @@ -581,6 +583,9 @@ const EventTypesPage = () => {
className="mb-4"
/>
)}

<NoCalendarConnectedAlert />

{data.eventTypeGroups.map((group, index) => (
<Fragment key={group.profile.slug}>
{/* hide list heading when there is only one (current user) */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import classNames from "classnames";
import React, { useEffect, useState } from "react";

import { useLocale } from "@calcom/lib/hooks/useLocale";
import { DestinationCalendar } from "@calcom/prisma/client";
import { trpc } from "@calcom/trpc/react";
import Select from "@calcom/ui/v2/core/form/Select";

Expand All @@ -10,6 +11,7 @@ interface Props {
isLoading?: boolean;
hidePlaceholder?: boolean;
/** The external Id of the connected calendar */
destinationCalendar?: DestinationCalendar | null;
value: string | undefined;
maxWidth?: number;
}
Expand All @@ -20,6 +22,7 @@ const DestinationCalendarSelector = ({
value,
hidePlaceholder,
maxWidth,
destinationCalendar,
}: Props): JSX.Element | null => {
const { t } = useLocale();
const query = trpc.useQuery(["viewer.connectedCalendars"]);
Expand Down Expand Up @@ -73,7 +76,15 @@ const DestinationCalendarSelector = ({
<div className="relative" title={`${t("select_destination_calendar")}: ${selectedOption?.label || ""}`}>
<Select
name="primarySelectedCalendar"
placeholder={!hidePlaceholder ? `${t("select_destination_calendar")}:` : undefined}
placeholder={
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should stay as this change was made on v1 component

!hidePlaceholder ? (
`${t("select_destination_calendar")}`
) : (
<span>
{t("default_calendar_selected")} ({destinationCalendar?.externalId})
</span>
)
}
options={options}
styles={{
placeholder: (styles) => ({ ...styles, ...content(hidePlaceholder) }),
Expand Down