mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 14:01:45 +02:00
chore: updated pricing validation for cloud and self hosted (#848)
This commit is contained in:
@@ -28,7 +28,7 @@ const calculateYearlyDiscount = (monthlyPrice: number, yearlyPricePerMonth: numb
|
||||
|
||||
const renderPlanPricing = (price: number, members: number = 1, recurring: string) => {
|
||||
if (recurring === "month") return ((price / 100) * members).toFixed(0);
|
||||
if (recurring === "year") return ((price / 1200) * members).toFixed(0);
|
||||
if (recurring === "year") return ((price / 100) * members).toFixed(0);
|
||||
};
|
||||
|
||||
const CloudUpgradePlanPage = observer(() => {
|
||||
@@ -73,7 +73,6 @@ const CloudUpgradePlanPage = observer(() => {
|
||||
|
||||
const monthlyPlanUnitPrice = (monthlyPlan?.unit_amount || 0) / 100;
|
||||
const yearlyPlanUnitPrice = (yearlyPlan?.unit_amount || 0) / 1200;
|
||||
|
||||
const yearlyDiscountedPrice = calculateYearlyDiscount(monthlyPlanUnitPrice, yearlyPlanUnitPrice);
|
||||
|
||||
const workspaceOnTrial =
|
||||
|
||||
@@ -22,7 +22,7 @@ const selfHostedProducts: TSelfHostedProduct[] = [
|
||||
},
|
||||
{
|
||||
recurring: "year",
|
||||
unit_amount: 6,
|
||||
unit_amount: 72,
|
||||
redirection_link: process.env.NEXT_PUBLIC_PRO_SELF_HOSTED_PAYMENT_URL || undefined,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user