Jelajahi Sumber

Merge pull request #27202 from overleaf/msm-fix-pricing

[web] Remove group size limits for additional licenses

GitOrigin-RevId: d48976ccd72ec5e99249f80ab5d3e9e85e089b18
Miguel Serrano 1 tahun lalu
induk
melakukan
7540bc9cbe
1 mengubah file dengan 7 tambahan dan 11 penghapusan
  1. 7 11
      services/web/scripts/recurly/generate_recurly_prices.mjs

+ 7 - 11
services/web/scripts/recurly/generate_recurly_prices.mjs

@@ -34,8 +34,6 @@ const argv = minimist(process.argv.slice(2), {
 const CURRENCY_CODE_REGEX = /^[A-Z]{3}$/
 // Group plans have a plan code of the form group_name_size_type, e.g.
 const GROUP_SIZE_REGEX = /group_\w+_([0-9]+)_\w+/
-// Only group plans with more than 4 users can have additional licenses
-const SINGLE_LICENSE_MAX_GROUP_SIZE = 4
 
 // Compute prices for the base plan
 
@@ -92,15 +90,13 @@ function transformRecordToPlan(record) {
   // Large group plans have an add-on for additional licenses
   if (isGroupPlan(record)) {
     const size = getGroupSize(record)
-    if (size > SINGLE_LICENSE_MAX_GROUP_SIZE) {
-      const addOnPrices = computeAddOnPrices(prices, size)
-      plan._addOns = [
-        {
-          code: 'additional-license',
-          currencies: addOnPrices,
-        },
-      ]
-    }
+    const addOnPrices = computeAddOnPrices(prices, size)
+    plan._addOns = [
+      {
+        code: 'additional-license',
+        currencies: addOnPrices,
+      },
+    ]
   }
   return plan
 }