From b98f2045d01571f74c03593db16198417a10b814 Mon Sep 17 00:00:00 2001 From: Leo Giovanetti Date: Mon, 10 Jul 2023 11:44:22 -0300 Subject: [PATCH] chore: Teams empty screen (#9997) --- apps/web/pages/team/[slug].tsx | 4 ++-- apps/web/public/static/locales/en/common.json | 6 +++--- .../teams/components/CreateANewTeamForm.tsx | 1 - .../ee/teams/components/TeamsListing.tsx | 19 +++++++++++++++++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/apps/web/pages/team/[slug].tsx b/apps/web/pages/team/[slug].tsx index 0d97d1cf16..46e9c3c1cb 100644 --- a/apps/web/pages/team/[slug].tsx +++ b/apps/web/pages/team/[slug].tsx @@ -153,9 +153,9 @@ function TeamPage({ team, isUnpublished, markdownStrippedBio, isValidOrgDomain }

- {" " + t("no_teams_yet")} + {" " + t("org_no_teams_yet")}

-

{t("no_teams_yet_description")}

+

{t("org_no_teams_yet_description")}

diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index 2142d773c6..d5825854a0 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -695,7 +695,7 @@ "create_new_team": "Create a new team", "open_invitations": "Open Invitations", "new_team": "New Team", - "create_first_team_and_invite_others": "Create your first team and invite other users to work together with you.", + "create_first_team_and_invite_others": "Create your first team and invite other users to work together.", "create_team_to_get_started": "Create a team to get started", "teams": "Teams", "team": "Team", @@ -1913,8 +1913,8 @@ "team_names_empty": "Team names can't be empty", "team_names_repeated": "Team names can't be repeated", "user_belongs_organization": "User belongs to an organization", - "no_teams_yet": "This organization has no teams yet", - "no_teams_yet_description": "if you are an administrator, be sure to create teams to be shown here.", + "org_no_teams_yet": "This organization has no teams yet", + "org_no_teams_yet_description": "If you are an administrator, be sure to create teams to be shown here.", "set_up": "Set up", "set_up_your_profile": "Set up your profile", "set_up_your_profile_description": "Let people know who you are within {{orgName}}, and when they engage with your public link.", diff --git a/packages/features/ee/teams/components/CreateANewTeamForm.tsx b/packages/features/ee/teams/components/CreateANewTeamForm.tsx index 7eaaf56860..abcb0ae483 100644 --- a/packages/features/ee/teams/components/CreateANewTeamForm.tsx +++ b/packages/features/ee/teams/components/CreateANewTeamForm.tsx @@ -25,7 +25,6 @@ export const CreateANewTeamForm = () => { const router = useRouter(); const telemetry = useTelemetry(); const parsedQuery = querySchema.safeParse(router.query); - console.log({ parsedQuery }); const [serverErrorMessage, setServerErrorMessage] = useState(null); const orgBranding = useOrgBrandingValues(); diff --git a/packages/features/ee/teams/components/TeamsListing.tsx b/packages/features/ee/teams/components/TeamsListing.tsx index 24998c44ed..af2be89dc0 100644 --- a/packages/features/ee/teams/components/TeamsListing.tsx +++ b/packages/features/ee/teams/components/TeamsListing.tsx @@ -4,7 +4,7 @@ import { useEffect, useMemo, useState } from "react"; import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; -import { Alert, Label, showToast, ButtonGroup, Button } from "@calcom/ui"; +import { Alert, Button, ButtonGroup, EmptyScreen, Label, showToast } from "@calcom/ui"; import { EyeOff, Mail, RefreshCcw, UserPlus, Users, Video } from "@calcom/ui/components/icon"; import { UpgradeTip } from "../../../tips"; @@ -119,7 +119,22 @@ export function TeamsListing() {

{t("org_admins_can_create_new_teams")}

) }> - {teams.length > 0 ? : <>} + {teams.length > 0 ? ( + + ) : ( + + {t(`create_new_team`)} + + } + /> + )} );