Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove professional plan from billing #1337

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 1 addition & 75 deletions www/src/components/account/billing/BillingPricingCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Flex } from 'honorable'
import { useCallback, useContext, useState } from 'react'
import { useSearchParams } from 'react-router-dom'

import PlatformPlansContext from '../../../contexts/PlatformPlansContext'
import SubscriptionContext from '../../../contexts/SubscriptionContext'

import BillingDowngradeModal from './BillingDowngradeModal'
Expand Down Expand Up @@ -42,10 +41,7 @@ function CurrentPlanButton() {

function BillingPricingCards() {
const [searchParams, setSearchParams] = useSearchParams()
const { clusterMonthlyPricing, userMonthlyPricing } =
useContext(PlatformPlansContext)
const { isProPlan, isEnterprisePlan, isTrialAvailable } =
useContext(SubscriptionContext)
const { isProPlan, isEnterprisePlan } = useContext(SubscriptionContext)

const [downgradeModalOpen, setDowngradeModalOpen] = useState(false)

Expand Down Expand Up @@ -139,76 +135,6 @@ function BillingPricingCards() {
)
}
/>
<BillingPricingCard
title="Professional"
subtitle={
<>
${clusterMonthlyPricing}/cluster/month
<br />${userMonthlyPricing}/user/month
</>
}
items={[
{
label: 'Everything in Open-source plan',
checked: false,
},
{
label: 'Unlimited users',
checked: true,
},
{
label: 'Unlimited clusters',
checked: true,
},
{
label: '24 hour SLA',
checked: true,
},
{
label: 'Continuous deployment features',
checked: true,
},
{
label: 'Advanced user management',
checked: true,
},
{
label: 'Audit logs',
checked: true,
},
{
label: 'VPN',
checked: true,
},
{
label: 'Emergency hotfixes',
checked: true,
},
]}
callToAction={
isProPlan ? (
<CurrentPlanButton />
) : isEnterprisePlan ? (
<ContactUs />
) : isTrialAvailable ? (
<Button
primary
width="100%"
onClick={() => setOpenTrialModal(true)}
>
Start free trial
</Button>
) : (
<Button
primary
width="100%"
onClick={() => setUpgradeToProfessionalModalOpen(true)}
>
Upgrade now
</Button>
)
}
/>
<BillingPricingCard
title="Custom"
subtitle={
Expand Down
78 changes: 2 additions & 76 deletions www/src/components/account/billing/BillingPricingTable.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { Div } from 'honorable'
import { CheckIcon, CloseIcon } from '@pluralsh/design-system'
import { useContext } from 'react'

import PlatformPlansContext from '../../../contexts/PlatformPlansContext'
import { Div } from 'honorable'

const columnStyles = {
position: 'relative',
Expand Down Expand Up @@ -43,13 +40,10 @@ const lastColumnCellProps = {
}

function BillingPricingTable() {
const { clusterMonthlyPricing, userMonthlyPricing } =
useContext(PlatformPlansContext)

return (
<Div
display="grid"
gridTemplateColumns="repeat(4, 1fr)"
gridTemplateColumns="repeat(3, 1fr)"
>
<Div {...columnStyles}>
<Div
Expand Down Expand Up @@ -177,74 +171,6 @@ function BillingPricingTable() {
<CloseIcon color="icon-default" />
</Div>
</Div>
<Div {...columnStyles}>
<Div subtitle2>Professional</Div>
<Div body2>Unlimited</Div>
<Div body2>${clusterMonthlyPricing}/cluster/month</Div>
<Div body2>${userMonthlyPricing}/user/month</Div>
<Div body2>$200/pack of 5 services/month</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CloseIcon color="icon-default" />
</Div>
<Div>
<CloseIcon color="icon-default" />
</Div>
<Div>
<CloseIcon color="icon-default" />
</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>24 hours</Div>
<Div body2>Best effort</Div>
<Div body2>Google OAuth + OIDC</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CloseIcon color="icon-default" />
</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CheckIcon color="icon-success" />
</Div>
<Div>
<CloseIcon color="icon-default" />
</Div>
<Div>Available</Div>
<Div>
<CloseIcon color="icon-default" />
</Div>
<Div>
<CloseIcon color="icon-default" />
</Div>
<Div>
<CloseIcon color="icon-default" />
</Div>
<Div borderBottom="1px solid border-fill-two">
<CloseIcon color="icon-default" />
</Div>
</Div>
<Div {...columnStyles}>
<Div
{...lastColumnCellProps}
Expand Down
11 changes: 5 additions & 6 deletions www/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
BellIcon,
BrowseAppsIcon,
ClusterIcon,
CompassIcon,
CookieIcon,
Sidebar as DSSidebar,
DiscordIcon,
Expand Down Expand Up @@ -86,11 +85,11 @@ const MENU_ITEMS: MenuItem[] = [
icon: <PeopleIcon />,
path: '/account',
},
{
text: 'Roadmap',
icon: <CompassIcon />,
path: '/roadmap',
},
// {
// text: 'Roadmap',
// icon: <CompassIcon />,
// path: '/roadmap',
// },
]

function isActiveMenuItem(
Expand Down
Loading