mirror of
https://github.com/makeplane/plane.git
synced 2026-07-12 21:40:18 +02:00
chore: remove workspace activation tab. (#991)
* chore: remove workspace activation tab. * fix: activation page logic.
This commit is contained in:
@@ -12,7 +12,7 @@ import { useUser, useWorkspace } from "@/hooks/store";
|
||||
// plane web components
|
||||
import { SubscriptionActivation } from "@/plane-web/components/workspace";
|
||||
// plane web hooks
|
||||
import { useSelfHostedSubscription } from "@/plane-web/hooks/store";
|
||||
import { useSelfHostedSubscription, useWorkspaceSubscription } from "@/plane-web/hooks/store";
|
||||
|
||||
const ActivationPage = observer(() => {
|
||||
// router
|
||||
@@ -22,14 +22,16 @@ const ActivationPage = observer(() => {
|
||||
membership: { currentWorkspaceRole },
|
||||
} = useUser();
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { currentWorkspaceSubscribedPlanDetail: currentWorkspaceSubscribedPlan } = useWorkspaceSubscription();
|
||||
const { licenseActivationByWorkspaceSlug } = useSelfHostedSubscription();
|
||||
// derived values
|
||||
const pageTitle = currentWorkspace?.name ? `${currentWorkspace.name} - Activation` : undefined;
|
||||
const isAdmin = currentWorkspaceRole === EUserWorkspaceRoles.ADMIN;
|
||||
const isSelfManaged = !!currentWorkspaceSubscribedPlan?.is_self_managed;
|
||||
|
||||
if (!workspaceSlug || !currentWorkspace?.id) return <></>;
|
||||
if (!workspaceSlug || !currentWorkspace?.id || !isSelfManaged) return <></>;
|
||||
|
||||
if (!isAdmin || licenseActivationByWorkspaceSlug())
|
||||
if (!isAdmin && licenseActivationByWorkspaceSlug())
|
||||
return (
|
||||
<>
|
||||
<PageHead title={pageTitle} />
|
||||
|
||||
@@ -55,7 +55,7 @@ export const WORKSPACE_SETTINGS = {
|
||||
export const WORKSPACE_SETTINGS_LINKS = [
|
||||
WORKSPACE_SETTINGS["general"],
|
||||
WORKSPACE_SETTINGS["members"],
|
||||
WORKSPACE_SETTINGS["activation"],
|
||||
// WORKSPACE_SETTINGS["activation"], // FIXME: Temporary hide this tab
|
||||
WORKSPACE_SETTINGS["project_states"],
|
||||
WORKSPACE_SETTINGS["billing-and-plans"],
|
||||
WORKSPACE_SETTINGS["integrations"],
|
||||
|
||||
Reference in New Issue
Block a user