* create seed for org upgrade * migrate about/new pages * pages refactor + use persistant zustand store * invited members view + confirm button * add check to org slug * check reserved subdomain * remove quotes from subdomain env var * intro to creation + billing * create price * fix types * createWithPaymentIntent + permission check on teams * open stripe link in popup * intro to tests * organization price and seat override tests * move permissions to a new permission service * update env and permission check * intro to paid invoice trigger * dont use subId * wip * Get e2e working with migration of teams and members * fix ts errors * Get flow working again * Fix various issues and refactor * Some more fixes * Fix wrong page route link * Platform onboarding fix and moving members of team to org rix * Platform onboarding fix and moving members of team to org rix * Fix tests, found a bug * Get custom price flow working * Get admin impersonation flow working for a non-existent user * Fix unit test * Admin onboarding handover * fix admin onboarding tests * fix ts error * Get updateQuantity working * More fixes * fix test * fix schema name * Add tests * Add missing file * More tests * Add more tests * fix mt-2 moving down input into overflow * fix handover layout removing HOC * Update PR_TODO.md * fix ts error due to merge conflict --------- Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: Hariom <[email protected]> Co-authored-by: Omar López <[email protected]>
50 lines
1.5 KiB
TypeScript
50 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import { useSession } from "next-auth/react";
|
|
|
|
import { WEBAPP_URL } from "@calcom/lib/constants";
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
import { Button, showToast } from "@calcom/ui";
|
|
|
|
export const AdminOnboardingHandover = () => {
|
|
const { t } = useLocale();
|
|
const session = useSession();
|
|
const isAdmin = session.data?.user.role === "ADMIN";
|
|
|
|
if (!isAdmin) {
|
|
return null;
|
|
}
|
|
|
|
const onboardingUrl = `${WEBAPP_URL}/settings/organizations/new`;
|
|
|
|
return (
|
|
<div className="bg-subtle rounded-md p-4">
|
|
<div className="flex-col items-center gap-2">
|
|
<span className="text-emphasis font-medium">
|
|
User can now continue onboarding with the following link
|
|
</span>
|
|
<div className="mt-2 flex items-center gap-2">
|
|
<code
|
|
data-testid="onboarding-url"
|
|
className="bg-default text-default flex w-full items-center truncate rounded-md px-3 py-2 font-mono text-sm">
|
|
{onboardingUrl}
|
|
</code>
|
|
<Button
|
|
data-testid="copy-onboarding-url"
|
|
type="button"
|
|
variant="icon"
|
|
color="secondary"
|
|
className="h-9 w-9"
|
|
onClick={() => {
|
|
navigator.clipboard.writeText(onboardingUrl);
|
|
showToast(t("link_copied"), "success");
|
|
}}
|
|
StartIcon="clipboard"
|
|
tooltip={t("copy_to_clipboard")}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|