Create New Team (#4450)

* Add link to new teams

* Create new team

* Invite team members

* Bug fix

* Tidy up settings calendars (#4430)

* feat: 4232 - new theme toggle design. (#4371)

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>

* fix: Select dropdown styling (#4358)

* fix: select dropdown styling

* change check icon

* Revert select component, update v2 select

* Updates the background color to match figma design

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Syed Ali Shahbaz <[email protected]>
Co-authored-by: sean-brydon <[email protected]>

* Fix input height 36px (#4425)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Fix crash due to some props being undefined (#4427)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Improve event type item description visibility (#4404)

* Make event type description more visible

* Delete unneeded import

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Updating language in settings needs a reload to be translated (#4431)

Co-authored-by: gitstart <[email protected]>
Co-authored-by: Nitesh Singh <[email protected]>
Co-authored-by: Thiago Nascimbeni <[email protected]>
Co-authored-by: Grace Nshokano <[email protected]>
Co-authored-by: Matheus Muniz <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* fix: remove i18n from title and description (#4354)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Hariom Balhara <[email protected]>

* Fix styles and remove temporarily elements (#4448)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Fix deletion of route (#4466)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* feat: make toggle button default (#4437)

* feat: make switch default

* fix: refetch invalidated query

* React-query caching the previous isDefault state.

* fix: switch label color

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Refactor skeleton loader files to v2 folders (#4447)

* create v2 skeleton loaders

* add depreciation notice to old skeleton loader files

Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Adds rescheduling dropdown to past unconfirmed bookings (#3726)

Co-authored-by: Omar López <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* fix: add a consistent key to the day ranges list (#4401)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* remove "Weve changed billing for teams" banner in teams (#4432)

Co-authored-by: gitstart <[email protected]>
Co-authored-by: gitstart <[email protected]>
Co-authored-by: Grace Nshokano <[email protected]>
Co-authored-by: Nitesh Singh <[email protected]>
Co-authored-by: Matheus Muniz <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* fix: remove name prop from NumberWidget (#4346)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Fix bug

* Fix bug

* Squashed commit of the following:

commit c3cb839027
Author: Bailey Pumfleet <[email protected]>
Date:   Wed Sep 14 17:13:13 2022 +0100

    Remove outline from user dropdown trigger (#4470)

commit 91c39a0306
Author: Sascha Schworm <[email protected]>
Date:   Wed Sep 14 18:09:00 2022 +0200

    feat: Exchange with NTLM support (#4127)

    * add exchange package

    * fix conflicts

    * add setup page for v2

    * refactor setup page for v1

    * return exchange error messages to user if applicable

    Co-authored-by: Peer Richelsen <[email protected]>
    Co-authored-by: Joe Au-Yeung <[email protected]>

commit f1c15f4e8a
Author: alannnc <[email protected]>
Date:   Wed Sep 14 10:57:20 2022 -0500

    4382 onboarding fix the disabled state of the username in step 1 (#4451)

    * Convert username availability premium to v2

    * Update Username Availability to v2 design

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 3f29df16ad
Author: Alex van Andel <[email protected]>
Date:   Wed Sep 14 16:40:56 2022 +0100

    KBar included @calcom/ui/v2/core -> Shell -> KBar -> Shell -> ... (#4469)

commit 3a06947c8a
Author: Syed Ali Shahbaz <[email protected]>
Date:   Wed Sep 14 19:14:42 2022 +0530

    fixes active state of select options (#4456)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit f486b0242f
Author: Nafees Nazik <[email protected]>
Date:   Wed Sep 14 17:28:59 2022 +0530

    fix: remove name prop from NumberWidget (#4346)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 9bc2676822
Author: GitStart <[email protected]>
Date:   Wed Sep 14 12:41:47 2022 +0100

    remove "Weve changed billing for teams" banner in teams (#4432)

    Co-authored-by: gitstart <[email protected]>
    Co-authored-by: gitstart <[email protected]>
    Co-authored-by: Grace Nshokano <[email protected]>
    Co-authored-by: Nitesh Singh <[email protected]>
    Co-authored-by: Matheus Muniz <[email protected]>
    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 5c72aa3497
Author: Nafees Nazik <[email protected]>
Date:   Wed Sep 14 17:00:25 2022 +0530

    fix: add a consistent key to the day ranges list (#4401)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 09da911bf9
Author: Dallen Pyrah <[email protected]>
Date:   Wed Sep 14 05:02:26 2022 -0600

    Adds rescheduling dropdown to past unconfirmed bookings (#3726)

    Co-authored-by: Omar López <[email protected]>
    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 2fbaec41c9
Author: Carina Wollendorfer <[email protected]>
Date:   Wed Sep 14 06:35:40 2022 -0400

    Refactor skeleton loader files to v2 folders (#4447)

    * create v2 skeleton loaders

    * add depreciation notice to old skeleton loader files

    Co-authored-by: CarinaWolli <[email protected]>
    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 3bada22900
Author: Nafees Nazik <[email protected]>
Date:   Wed Sep 14 15:54:41 2022 +0530

    feat: make toggle button default (#4437)

    * feat: make switch default

    * fix: refetch invalidated query

    * React-query caching the previous isDefault state.

    * fix: switch label color

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 45059554b6
Author: Hariom Balhara <[email protected]>
Date:   Wed Sep 14 15:40:52 2022 +0530

    Fix deletion of route (#4466)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 8b69359ccb
Author: alannnc <[email protected]>
Date:   Wed Sep 14 04:55:49 2022 -0500

    Fix styles and remove temporarily elements (#4448)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit b457125915
Author: Udit Takkar <[email protected]>
Date:   Wed Sep 14 15:12:48 2022 +0530

    fix: remove i18n from title and description (#4354)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
    Co-authored-by: Hariom Balhara <[email protected]>

commit 01e0fed3c5
Author: GitStart <[email protected]>
Date:   Wed Sep 14 10:28:23 2022 +0100

    Updating language in settings needs a reload to be translated (#4431)

    Co-authored-by: gitstart <[email protected]>
    Co-authored-by: Nitesh Singh <[email protected]>
    Co-authored-by: Thiago Nascimbeni <[email protected]>
    Co-authored-by: Grace Nshokano <[email protected]>
    Co-authored-by: Matheus Muniz <[email protected]>
    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit c09107cec8
Author: Noah <[email protected]>
Date:   Wed Sep 14 11:08:50 2022 +0200

    Improve event type item description visibility (#4404)

    * Make event type description more visible

    * Delete unneeded import

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 2f9905e548
Author: Hariom Balhara <[email protected]>
Date:   Wed Sep 14 14:16:42 2022 +0530

    Fix crash due to some props being undefined (#4427)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit ab4d910564
Author: sean-brydon <[email protected]>
Date:   Wed Sep 14 09:18:40 2022 +0100

    Fix input height 36px (#4425)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 34bca4984f
Author: John Afolabi <[email protected]>
Date:   Wed Sep 14 08:27:00 2022 +0100

    fix: Select dropdown styling (#4358)

    * fix: select dropdown styling

    * change check icon

    * Revert select component, update v2 select

    * Updates the background color to match figma design

    Co-authored-by: Peer Richelsen <[email protected]>
    Co-authored-by: Syed Ali Shahbaz <[email protected]>
    Co-authored-by: sean-brydon <[email protected]>

commit 0907d154c7
Author: Jeroen Reumkens <[email protected]>
Date:   Wed Sep 14 09:15:13 2022 +0200

    feat: 4232 - new theme toggle design. (#4371)

    Co-authored-by: Peer Richelsen <[email protected]>
    Co-authored-by: Joe Au-Yeung <[email protected]>

commit 6f807930f6
Author: sean-brydon <[email protected]>
Date:   Tue Sep 13 21:13:24 2022 +0100

    Tidy up settings calendars (#4430)

* Fix types

* Cleanup

Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: Jeroen Reumkens <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: John Afolabi <[email protected]>
Co-authored-by: Syed Ali Shahbaz <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Hariom Balhara <[email protected]>
Co-authored-by: Noah <[email protected]>
Co-authored-by: GitStart <[email protected]>
Co-authored-by: gitstart <[email protected]>
Co-authored-by: Nitesh Singh <[email protected]>
Co-authored-by: Thiago Nascimbeni <[email protected]>
Co-authored-by: Grace Nshokano <[email protected]>
Co-authored-by: Matheus Muniz <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: alannnc <[email protected]>
Co-authored-by: Nafees Nazik <[email protected]>
Co-authored-by: Carina Wollendorfer <[email protected]>
Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: Dallen Pyrah <[email protected]>
Co-authored-by: Omar López <[email protected]>
Co-authored-by: gitstart <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
9 files changed
+445 -101

No files matched your search

@@ -0,0 +1,114 @@
import Head from "next/head";
import { useRouter } from "next/router";
import { useState } from "react";
import { z } from "zod";
// import TeamGeneralSettings from "@calcom/features/teams/createNewTeam/TeamGeneralSettings";
import AddNewTeamMembers from "@calcom/features/ee/teams/components/v2/AddNewTeamMembers";
import CreateNewTeam from "@calcom/features/ee/teams/components/v2/CreateNewTeam";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { StepCard } from "@components/getting-started/components/StepCard";
import { Steps } from "@components/getting-started/components/Steps";
const INITIAL_STEP = "create-a-new-team";
// TODO: Add teams general settings "general-settings"
const steps = ["create-a-new-team", "add-team-members"] as const;
const stepTransform = (step: typeof steps[number]) => {
const stepIndex = steps.indexOf(step);
if (stepIndex > -1) {
return steps[stepIndex];
}
return INITIAL_STEP;
};
const stepRouteSchema = z.object({
step: z.array(z.enum(steps)).default([INITIAL_STEP]),
});
const CreateNewTeamPage = () => {
const router = useRouter();
const { t } = useLocale();
const [teamId, setTeamId] = useState<number>();
const result = stepRouteSchema.safeParse(router.query);
const currentStep = result.success ? result.data.step[0] : INITIAL_STEP;
const headers = [
{
title: `${t("create_a_new_team")}`,
subtitle: [`${t("create_a_new_team_description")}`],
},
// {
// title: `${t("general_settings")}`,
// subtitle: [`${t("general_settings_description")}`],
// },
{
title: `${t("add_team_members")}`,
subtitle: [`${t("add_team_members_description")}`],
},
];
const goToIndex = (index: number) => {
const newStep = steps[index];
router.push(
{
pathname: `/settings/teams/new/${stepTransform(newStep)}`,
},
undefined
);
};
const currentStepIndex = steps.indexOf(currentStep);
return (
<div
className="dark:bg-brand dark:text-brand-contrast min-h-screen text-black"
data-testid="onboarding"
key={router.asPath}>
<Head>
<title>{t("create_a_new_team")}</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<div className="mx-auto px-4 py-24">
<div className="relative">
<div className="sm:mx-auto sm:w-full sm:max-w-[600px]">
<div className="mx-auto sm:max-w-[520px]">
<header>
<p className="font-cal mb-3 text-[28px] font-medium leading-7">
{headers[currentStepIndex]?.title || "Undefined title"}
</p>
<p className="font-sans text-sm font-normal text-gray-500">
{headers[currentStepIndex]?.subtitle}
</p>
</header>
<Steps maxSteps={steps.length} currentStep={currentStepIndex} navigateToStep={goToIndex} />
</div>
<StepCard>
{currentStep === "create-a-new-team" && (
<CreateNewTeam
nextStep={() => {
goToIndex(1);
}}
setTeamId={(teamId: number) => setTeamId(teamId)}
/>
)}
{/* {currentStep === "general-settings" && (
<TeamGeneralSettings teamId={teamId} nextStep={() => goToIndex(2)} />
)} */}
{currentStep === "add-team-members" && teamId && <AddNewTeamMembers teamId={teamId} />}
</StepCard>
</div>
</div>
</div>
</div>
);
};
export default CreateNewTeamPage;
@@ -498,7 +498,7 @@
"lets_create_first_administrator_user": "Let's create the first administrator user.",
"new_member": "New Member",
"invite": "Invite",
"invite_new_member": "Invite a new member",
"invite_new_member": "Invite a new team member",
"invite_new_team_member": "Invite someone to your team.",
"change_member_role": "Change team member role",
"disable_cal_branding": "Disable Cal branding",
@@ -1240,6 +1240,7 @@
"password_updated":"Password updated!",
"pending_payment": "Pending payment",
"confirmation_page_rainbow": "Token gate your event with tokens or NFTs on Ethereum, Polygon, and more.",
"not_on_cal": "Not on Cal.com",
"no_calendar_installed": "No calendar installed",
"no_calendar_installed_description": "You have not yet connected any of your calendars",
"add_a_calendar": "Add a calendar"