mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 07:39:02 +02:00
Fix monthly price if billed annually for AI Assist (#25297)
* Fix monthly price if billed annually for AI Assist * update script * show annual price * fix formatting GitOrigin-RevId: e50493fa2176e6c8acb476a01a393eb940a3f1a2
This commit is contained in:
committed by
Copybot
parent
c1f3758aa2
commit
b99a81cb25
@@ -949,9 +949,17 @@ const _ProjectController = {
|
||||
const annualPrice = Settings.localizedAddOnsPricing[currency][plan].annual
|
||||
const monthlyPrice =
|
||||
Settings.localizedAddOnsPricing[currency][plan].monthly
|
||||
const annualDividedByTwelve =
|
||||
Settings.localizedAddOnsPricing[currency][plan].annualDividedByTwelve
|
||||
|
||||
plansData[plan] = {
|
||||
annual: formatCurrency(annualPrice, currency, locale, true),
|
||||
annualDividedByTwelve: formatCurrency(
|
||||
annualDividedByTwelve,
|
||||
currency,
|
||||
locale,
|
||||
true
|
||||
),
|
||||
monthly: formatCurrency(monthlyPrice, currency, locale, true),
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1203,7 +1203,7 @@
|
||||
"pending_invite": "",
|
||||
"per_license": "",
|
||||
"per_month": "",
|
||||
"per_month_billed_annually": "",
|
||||
"per_month_x_annually": "",
|
||||
"percent_is_the_percentage_of_the_line_width": "",
|
||||
"permanently_disables_the_preview": "",
|
||||
"personal_library": "",
|
||||
|
||||
@@ -55,7 +55,10 @@ import type { ScriptLogType } from '../../../modules/admin-panel/frontend/js/fea
|
||||
import { ActiveExperiment } from './labs-utils'
|
||||
export interface Meta {
|
||||
'ol-ExposedSettings': ExposedSettings
|
||||
'ol-addonPrices': Record<string, { annual: string; monthly: string }>
|
||||
'ol-addonPrices': Record<
|
||||
string,
|
||||
{ annual: string; monthly: string; annualDividedByTwelve: string }
|
||||
>
|
||||
'ol-allInReconfirmNotificationPeriods': UserEmailData[]
|
||||
'ol-allowedExperiments': string[]
|
||||
'ol-allowedImageNames': AllowedImageName[]
|
||||
|
||||
@@ -1594,6 +1594,7 @@
|
||||
"per_license": "per license",
|
||||
"per_month": "per month",
|
||||
"per_month_billed_annually": "per month, billed annually",
|
||||
"per_month_x_annually": "per month, __price__ annually",
|
||||
"per_user_month": "per user / month",
|
||||
"per_user_year": "per user / year",
|
||||
"per_year": "per year",
|
||||
|
||||
@@ -37,6 +37,8 @@ async function main() {
|
||||
localizedAddOnsPricing[currency] = { [ADD_ON_CODE]: {} }
|
||||
}
|
||||
localizedAddOnsPricing[currency][ADD_ON_CODE].annual = unitAmount
|
||||
localizedAddOnsPricing[currency][ADD_ON_CODE].annualDividedByTwelve =
|
||||
(unitAmount || 0) / 12
|
||||
}
|
||||
|
||||
console.log(JSON.stringify({ localizedAddOnsPricing }, null, 2))
|
||||
|
||||
Reference in New Issue
Block a user