diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index a0cc921aab..589f8a03da 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -1557,6 +1557,11 @@ "email_no_user_step_four":"Join {{teamName}}", "email_no_user_signoff":"Happy Scheduling from the {{appName}} team", "impersonation_user_tip": "You are about to impersonate a user, which means you can make changes on their behalf. Please be careful.", + "scheduler": "{Scheduler}", "available_variables": "Available variables", - "scheduler": "{Scheduler}" + "recommended_next_steps": "Recommended next steps", + "create_a_managed_event": "Create a managed event type", + "meetings_are_better_with_the_right": "Meetings are better with the right team members there. Invite them now.", + "collective_or_roundrobin": "Collective or round-robin", + "book_your_team_members": "Book your team members together with collective events or cycle through to get the right person with round-robin." } diff --git a/packages/features/ee/teams/components/TeamList.tsx b/packages/features/ee/teams/components/TeamList.tsx index 9595ab5534..6f66771996 100644 --- a/packages/features/ee/teams/components/TeamList.tsx +++ b/packages/features/ee/teams/components/TeamList.tsx @@ -1,7 +1,9 @@ import { useState } from "react"; +import { useLocale } from "@calcom/lib/hooks/useLocale"; import { RouterOutputs, trpc } from "@calcom/trpc/react"; -import { showToast } from "@calcom/ui"; +import { Card, showToast } from "@calcom/ui"; +import { FiUserPlus, FiUsers, FiUnlock, FiEdit } from "@calcom/ui/components/icon"; import TeamListItem from "./TeamListItem"; @@ -12,6 +14,8 @@ interface Props { export default function TeamList(props: Props) { const utils = trpc.useContext(); + const { t } = useLocale(); + const [hideDropdown, setHideDropdown] = useState(false); function selectAction(action: string, teamId: number) { @@ -47,6 +51,72 @@ export default function TeamList(props: Props) { setHideDropdown={setHideDropdown} /> ))} + + {/* only show recommended steps when there is only one team */} + {props.teams.length === 1 && ( + <> + {props.teams.map( + (team, i) => + i === 0 && ( +
+

{t("recommended_next_steps")}

+
+ } + variant="basic" + title={t("invite_team_member")} + description="Meetings are better with the right team members there. Invite them now." + actionButton={{ + href: "/settings/teams/" + team.id + "/members", + child: t("invite"), + }} + /> + {/* @TODO: uncomment once managed event types is live + } + variant="basic" + title={t("create_a_managed_event")} + description={t("meetings_are_better_with_the_right")} + actionButton={{ + href: + "/event-types?dialog=new-eventtype&eventPage=team%2F" + + team.slug + + "&teamId=" + + team.id + + "&managed=true", + child: t("create"), + }} + /> */} + } + variant="basic" + title={t("collective_or_roundrobin")} + description={t("book_your_team_members")} + actionButton={{ + href: + "/event-types?dialog=new-eventtype&eventPage=team%2F" + + team.slug + + "&teamId=" + + team.id, + child: t("create"), + }} + /> + } + variant="basic" + title={t("appearance")} + description={t("appearance_subtitle")} + actionButton={{ + href: "/settings/teams/" + team.id + "/appearance", + child: t("edit"), + }} + /> +
+
+ ) + )} + + )} ); } diff --git a/packages/features/ee/teams/components/TeamsListing.tsx b/packages/features/ee/teams/components/TeamsListing.tsx index c3f0e1553a..b4d449cf1f 100644 --- a/packages/features/ee/teams/components/TeamsListing.tsx +++ b/packages/features/ee/teams/components/TeamsListing.tsx @@ -68,6 +68,8 @@ export function TeamsListing() { ; buttons?: JSX.Element; @@ -36,7 +40,14 @@ export function UpgradeTip({ if (isParentLoading || isLoading) return <>{isParentLoading}; if (!isCalcom) - return ; + return ( + + ); return ( <> diff --git a/packages/ui/components/card/Card.tsx b/packages/ui/components/card/Card.tsx index 0bc2f432be..e2145c28a1 100644 --- a/packages/ui/components/card/Card.tsx +++ b/packages/ui/components/card/Card.tsx @@ -1,13 +1,16 @@ +// @TODO: turn this into a more generic component that has the same Props API as MUI https://mui.com/material-ui/react-card/ import Link from "next/link"; import { ReactNode } from "react"; import React from "react"; import classNames from "@calcom/lib/classNames"; +import { FiArrowRight } from "@calcom/ui/components/icon"; import { Button } from "../button"; export type BaseCardProps = { image?: string; + icon?: ReactNode; variant: keyof typeof cardTypeByVariant; imageProps?: JSX.IntrinsicElements["img"]; title: string; @@ -26,10 +29,12 @@ export type BaseCardProps = { thumbnailUrl?: string; }; +// @TODO: use CVA + const cardTypeByVariant = { - AppStore: { + basic: { image: "w-10 h-auto", - card: "p-5 w-64", + card: "p-5", title: "text-base", description: "text-sm leading-[18px] text-gray-500 font-normal", }, @@ -50,6 +55,7 @@ const cardTypeByVariant = { export function Card({ image, title, + icon, description, variant, actionButton, @@ -64,33 +70,36 @@ export function Card({ className={classNames( containerProps?.className, cardTypeByVariant[variant].card, - "rounded-md border border-gray-200 bg-white" + "flex flex-col justify-between rounded-md border border-gray-200 bg-white" )} {...containerProps}> - {image && ( - {imageProps?.alt} - )} -
- {title} -
- {description && ( -

- {description} -

- )} +
+ {icon && icon} + {image && ( + {imageProps?.alt} + )} +
+ {title} +
+ {description && ( +

+ {description} +

+ )} +
{variant === "SidebarCard" && ( )} - {variant === "AppStore" && ( - - )} + + {/* TODO: this should be CardActions https://mui.com/material-ui/api/card-actions/ */} +
+ {variant === "basic" && ( + + )} +
+ {variant === "SidebarCard" && (
{learnMore && (