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

fix: include left-behind ingestion fixes #15238

Merged
merged 10 commits into from
Apr 25, 2023
10 changes: 7 additions & 3 deletions frontend/src/scenes/billing/test/BillingProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,13 @@ export const BillingProduct = ({ product }: { product: BillingProductV2Type }):
)}
<div className="flex gap-x-2 items-center mb-2">
<IconCheckCircleOutline className="text-success" />
<Link onClick={toggleIsPlanComparisonModalOpen}>
<b>And more...</b>
</Link>
{product.subscribed ? (
<b>And more</b>
) : (
<Link onClick={toggleIsPlanComparisonModalOpen}>
<b>And more...</b>
</Link>
)}
</div>
</div>
{upgradePlan?.tiers?.[0].unit_amount_usd &&
Expand Down
18 changes: 16 additions & 2 deletions frontend/src/scenes/billing/test/PlanComparisonModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LemonButton, LemonModal } from '@posthog/lemon-ui'
import { LemonButton, LemonModal, LemonTag, Link } from '@posthog/lemon-ui'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
import { IconCheckmark, IconClose, IconWarning } from 'lib/lemon-ui/icons'
import { BillingProductV2AddonType, BillingProductV2Type, BillingV2FeatureType, BillingV2PlanType } from '~/types'
Expand Down Expand Up @@ -104,7 +104,7 @@ export const PlanComparisonModal = ({
to={
includeAddons
? getUpgradeAllProductsLink(product, plan.plan_key || '', redirectPath)
: `/api/billing-v2/activation?products=${product.type}:${plan.plan_key}&redirectPath=${redirectPath}`
: `/api/billing-v2/activation?products=${product.type}:${plan.plan_key}&redirect_path=${redirectPath}`
}
type={plan.current_plan ? 'secondary' : 'primary'}
fullWidth
Expand All @@ -119,6 +119,17 @@ export const PlanComparisonModal = ({
>
{plan.current_plan ? 'Current plan' : 'Upgrade'}
</LemonButton>
{!plan.current_plan && includeAddons && product.addons?.length > 0 && (
<p className="text-center ml-0 mt-2 mb-0">
<Link
to={`/api/billing-v2/activation?products=${product.type}:${plan.plan_key}&redirect_path=${redirectPath}`}
className="text-muted text-xs"
disableClientSideRouting
>
or upgrade without addons
</Link>
</p>
)}
</td>
)
})
Expand Down Expand Up @@ -181,6 +192,9 @@ export const PlanComparisonModal = ({
<th scope="row">
<p className="ml-0">
<span className="font-bold">{addon.name}</span>
<LemonTag type="purple" className="ml-2">
addon
</LemonTag>
</p>
<p className="ml-0 text-xs text-muted mt-1">Priced per {addon.unit}</p>
</th>
Expand Down