From dd14e827e12bc240b7b5c302609e17c5929f01fe Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Thu, 29 Sep 2022 10:47:51 +0100 Subject: [PATCH] added cancel button to team creation (#4756) * added cancel button * nit * nit --- .../pages/v2/settings/teams/new/[[...step]].tsx | 3 +-- apps/web/public/static/locales/en/common.json | 3 ++- .../ee/teams/components/v2/CreateNewTeam.tsx | 12 +++++++++--- packages/ui/v2/core/layouts/SettingsLayout.tsx | 14 ++++++-------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/apps/web/pages/v2/settings/teams/new/[[...step]].tsx b/apps/web/pages/v2/settings/teams/new/[[...step]].tsx index 9db828eb89..cf06837231 100644 --- a/apps/web/pages/v2/settings/teams/new/[[...step]].tsx +++ b/apps/web/pages/v2/settings/teams/new/[[...step]].tsx @@ -69,10 +69,9 @@ const CreateNewTeamPage = () => { data-testid="onboarding" key={router.asPath}> - {t("create_new_team")} + Create a new Team -
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index a01fa9854f..fcb47755cc 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -1268,5 +1268,6 @@ "confirm_password_change_email": "Please confirm your password before changing your email address", "seats": "seats", "every_app_published": "Every app published on the Cal.com App Store is open source and thoroughly tested via peer reviews. Nevertheless, Cal.com, Inc. does not endorse or certify these apps unless they are published by Cal.com. If you encounter inappropriate content or behaviour please report it.", - "report_app": "Report app" + "report_app": "Report app", + "team_name_required": "Team name required" } diff --git a/packages/features/ee/teams/components/v2/CreateNewTeam.tsx b/packages/features/ee/teams/components/v2/CreateNewTeam.tsx index 204279a69e..2eaa051ded 100644 --- a/packages/features/ee/teams/components/v2/CreateNewTeam.tsx +++ b/packages/features/ee/teams/components/v2/CreateNewTeam.tsx @@ -91,9 +91,15 @@ const CreateANewTeamForm = (props: { nextStep: () => void; setTeamId: (teamId: n )} />
- +
+ + +
+ {createTeamMutation.isError &&

{createTeamMutation.error.message}

} ); diff --git a/packages/ui/v2/core/layouts/SettingsLayout.tsx b/packages/ui/v2/core/layouts/SettingsLayout.tsx index 8a9eb258ca..a236bc1037 100644 --- a/packages/ui/v2/core/layouts/SettingsLayout.tsx +++ b/packages/ui/v2/core/layouts/SettingsLayout.tsx @@ -118,14 +118,12 @@ const SettingsSidebarContainer = ({ className = "" }) => { aria-label="Tabs"> <>
-
history.back()}> - -
+ {tabsWithPermissions.map((tab) => { return tab.name !== "teams" ? (