diff --git a/apps/web/components/App.tsx b/apps/web/components/App.tsx index c8b41fb82e..438692f7ac 100644 --- a/apps/web/components/App.tsx +++ b/apps/web/components/App.tsx @@ -92,11 +92,6 @@ const Component = ({

{name}

- {isProOnly && user?.plan === "FREE" ? ( - - PRO - - ) : null}

{categories[0]} • {t("published_by", { author })} diff --git a/apps/web/components/apps/AppCard.tsx b/apps/web/components/apps/AppCard.tsx index 94a45d492d..c383051b7c 100644 --- a/apps/web/components/apps/AppCard.tsx +++ b/apps/web/components/apps/AppCard.tsx @@ -32,11 +32,6 @@ export default function AppCard(props: AppCardProps) {

{props.app.name}

- {props.app.isProOnly && user?.plan === "FREE" ? ( - - PRO - - ) : null}
{/* TODO: add reviews
{props.rating} stars diff --git a/apps/web/components/v2/apps/App.tsx b/apps/web/components/v2/apps/App.tsx index ec319b9003..f9b3557ac5 100644 --- a/apps/web/components/v2/apps/App.tsx +++ b/apps/web/components/v2/apps/App.tsx @@ -114,11 +114,6 @@ const Component = ({
{name}

{name}

- {isProOnly && user?.plan === "FREE" ? ( - - PRO - - ) : null}

diff --git a/apps/web/lib/isSuccessRedirectAvailable.tsx b/apps/web/lib/isSuccessRedirectAvailable.tsx deleted file mode 100644 index b09b8246ae..0000000000 --- a/apps/web/lib/isSuccessRedirectAvailable.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { Team, User } from "@prisma/client"; - -export function isSuccessRedirectAvailable( - eventType: { - users: { - plan: User["plan"]; - }[]; - } & { - team: Partial | null; - } -) { - // As Team Event is available in PRO plan only, just check if it's a team event. - return eventType.users[0]?.plan !== "FREE" || eventType.team; -} diff --git a/apps/web/pages/[user].tsx b/apps/web/pages/[user].tsx index bac7e3298c..42db4a315e 100644 --- a/apps/web/pages/[user].tsx +++ b/apps/web/pages/[user].tsx @@ -4,7 +4,7 @@ import { GetServerSidePropsContext } from "next"; import dynamic from "next/dynamic"; import Link from "next/link"; import { useRouter } from "next/router"; -import { useEffect, useState } from "react"; +import { useEffect } from "react"; import { Toaster } from "react-hot-toast"; import { JSONObject } from "superjson/dist/types"; @@ -244,7 +244,6 @@ const getEventTypesWithHiddenFromDB = async (userId: number, plan: UserPlan) => metadata: true, ...baseEventTypeSelect, }, - take: plan === UserPlan.FREE ? 1 : undefined, }); }; diff --git a/apps/web/pages/[user]/[type].tsx b/apps/web/pages/[user]/[type].tsx index cf0390f8bb..026105231a 100644 --- a/apps/web/pages/[user]/[type].tsx +++ b/apps/web/pages/[user]/[type].tsx @@ -93,12 +93,9 @@ async function getUserPageProps(context: GetStaticPropsContext) { if (!user) return { notFound: true }; - const eventTypeIds = user.eventTypes.map((e) => e.id); const eventTypes = await prisma.eventType.findMany({ where: { slug, - /* Free users can only display their first eventType */ - id: user.plan === UserPlan.FREE ? eventTypeIds[0] : undefined, OR: [{ userId: user.id }, { users: { some: { id: user.id } } }], }, // Order is important to ensure that given a slug if there are duplicates, we choose the same event type consistently when showing in event-types list UI(in terms of ordering and disabled event types) diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx index 29de73af56..649daf63ab 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -36,14 +36,12 @@ import { Icon } from "@calcom/ui/Icon"; import Shell from "@calcom/ui/Shell"; import Switch from "@calcom/ui/Switch"; import { Tooltip } from "@calcom/ui/Tooltip"; -import { UpgradeToProDialog } from "@calcom/ui/UpgradeToProDialog"; import { Form } from "@calcom/ui/form/fields"; import { QueryCell } from "@lib/QueryCell"; import { asStringOrThrow, asStringOrUndefined } from "@lib/asStringOrNull"; import { getSession } from "@lib/auth"; import { HttpError } from "@lib/core/http/error"; -import { isSuccessRedirectAvailable } from "@lib/isSuccessRedirectAvailable"; import { slugify } from "@lib/slugify"; import { inferSSRProps } from "@lib/types/inferSSRProps"; @@ -132,8 +130,6 @@ const SuccessRedirectEdit = >({ formMethods: T; }) => { const { t } = useLocale(); - const proUpgradeRequired = !isSuccessRedirectAvailable(eventType); - const [modalOpen, setModalOpen] = useState(false); return ( <> @@ -144,19 +140,12 @@ const SuccessRedirectEdit = >({ htmlFor="successRedirectUrl" className="flex h-full items-center text-sm font-medium text-neutral-700"> {t("redirect_success_booking")} - {proUpgradeRequired && PRO}

{ - if (proUpgradeRequired) { - e.preventDefault(); - setModalOpen(true); - } - }} - readOnly={proUpgradeRequired} + readOnly={eventType.team !== undefined} type="url" className="block w-full rounded-sm border-gray-300 text-sm" placeholder={t("external_redirect_url")} @@ -164,9 +153,6 @@ const SuccessRedirectEdit = >({ {...formMethods.register("successRedirectUrl")} />
- - {t("redirect_url_upgrade_description")} - ); diff --git a/apps/web/pages/event-types/index.tsx b/apps/web/pages/event-types/index.tsx index d2688c1582..3b01c2782d 100644 --- a/apps/web/pages/event-types/index.tsx +++ b/apps/web/pages/event-types/index.tsx @@ -66,10 +66,7 @@ const Item = ({ type, group, readOnly }: { type: EventType; group: EventTypeGrou return (
-
-
- {types.length > 1 && !type.$disabled && ( - <> - +
  • +
    +
    + + + - - - )}
    {type.users?.length > 1 && ( ({ @@ -262,11 +245,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL }))} /> )} -
    +
    - )} +
  • +
    +
    + {!(firstItem && firstItem.id === type.id) && ( + + )} - {!(lastItem && lastItem.id === type.id) && ( - - )} - + {!(lastItem && lastItem.id === type.id) && ( + )}
    @@ -251,7 +230,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL {type.users?.length > 1 && ( ({ @@ -261,11 +240,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL }))} /> )} -
    +
    {type.hidden && ( {t("hidden")} @@ -291,7 +266,6 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL size="icon" href={calLink} StartIcon={Icon.FiExternalLink} - disabled={type.$disabled} combined /> @@ -301,7 +275,6 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL color="secondary" size="icon" StartIcon={Icon.FiLink} - disabled={type.$disabled} onClick={() => { showToast(t("link_copied"), "success"); navigator.clipboard.writeText(calLink); @@ -324,7 +297,6 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL {t("edit") as string} @@ -333,7 +305,6 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL openModal(group, type)}> {t("duplicate") as string} @@ -344,10 +315,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL as={DropdownItem} type="button" StartIcon={Icon.FiCode} - className={classNames( - "w-full rounded-none", - type.$disabled && " pointer-events-none cursor-not-allowed opacity-30" - )} + className="w-full rounded-none" embedUrl={encodeURIComponent(embedLink)}> {t("embed")} @@ -362,7 +330,6 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL setDeleteDialogTypeId(type.id); }} StartIcon={Icon.FiTrash} - disabled={type.$disabled} className="w-full rounded-none"> {t("delete") as string} @@ -378,13 +345,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
    -