feat: Onboarding V3 (#24299)

* feat: redirect to new onboarding flow

* Getting started

* Brand details

* Preview organization brands

* Orgs team pages

* Invite team steps

* Move to global zustand store

* Few darkmdoe fixes

* Wip onboarding + stripe flow

* Default plan state

Server Action for gettting slug satus of org

* Remove onboardingId

* Confirmation prompt

* Update old onboarding flow handlers to handle new fields

* update onboarding hook

* Filter out organization section for none -company emails

* Match placeholders to users domain

* Drop migration

* Wip new onboarding intent

* WIP flow for self-hosted. Same service call just split logic

* WIP

* Add TODO

* Use onboarding user type instead of trpc session

* WIP

* WIP

* pass role and team name from onboarding to save in schema

* Add test to ensure role + name + team are persisted into onboarding table

* migrate roles to enum values

* Update ENUM

* Fix type error

* Redirect if flag is disabled

* Revert packages

* Revert all packages/* changes to original branch point

* Layout fixes + design

* Add slugify

* Support saving brand,logo and banner

* Cleanup

* iMobile fixes

* More mobile and darkmdoe fixes

* Add I18n

* Fix lock file

* Fix types

* Fix types errors

* Copy changes
This commit is contained in:
sean-brydon authored and GitHub committed 2025-10-23 20:01:54 +01:00
1 parent fcd9480f9f
commit 8e0cdf3671
25 files changed
+1871 -12

No files matched your search

@@ -0,0 +1,64 @@
"use client";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { Button } from "@calcom/ui/components/button";
import { Icon } from "@calcom/ui/components/icon";
import { useOnboardingStore } from "../store/onboarding-store";
export const OnboardingContinuationPrompt = () => {
const router = useRouter();
const { organizationDetails, resetOnboarding } = useOnboardingStore();
const [isVisible, setIsVisible] = useState(false);
useEffect(() => {
// Check if there's existing organization data
const hasExistingData = organizationDetails.name && organizationDetails.link;
setIsVisible(!!hasExistingData);
}, [organizationDetails]);
if (!isVisible) {
return null;
}
const handleContinue = () => {
// Navigate to the next step in the flow (brand page)
router.push("/onboarding/organization/brand");
};
const handleStartOver = () => {
resetOnboarding();
setIsVisible(false);
};
return (
<div className="animate-fade-in fixed bottom-4 right-4 z-50">
<div className="bg-default border-muted shadow-default relative w-[360px] rounded-lg border p-4">
<button
onClick={() => setIsVisible(false)}
className="text-muted hover:text-emphasis absolute right-2 top-2 rounded-md p-1 transition-colors">
<Icon name="x" className="h-4 w-4" />
</button>
<div className="mb-3 pr-6">
<h3 className="text-emphasis mb-1 text-base font-semibold">Continue onboarding?</h3>
<p className="text-subtle text-sm">
Would you like to carry on with onboarding for{" "}
<span className="text-emphasis font-medium">{organizationDetails.name}</span> or start over?
</p>
</div>
<div className="ml-auto flex gap-2">
<Button onClick={handleStartOver} color="secondary">
Start over
</Button>
<Button onClick={handleContinue} color="primary">
Continue
</Button>
</div>
</div>
</div>
);
};