* fix the styling of the red text notice under checkout link
* avoid some code repetition
* simplify rendering the change_plan_link
* refactor disabling checkout link and showing disabled message
* disable change plan and upgrade link when exceeding pageview limit
* disable checkout when exceeding team member limit
* disable checkout when site limit exceeded
* extract checkout related code in a separate function
* stick to a single order of features
* losing features warning
* fix back link from change-plan-preview
* create Quota.exceeded_limits function
* restrict subscribing with exceeded limits on the API level too
* use with instead of case
Co-authored-by: Vini Brasil <vini@hey.com>
* use :map type instead of :any for user
Co-authored-by: Vini Brasil <vini@hey.com>
* create Quota.usage function
---------
Co-authored-by: Vini Brasil <vini@hey.com>
"This plan does not support #{features_list_str}, which you are currently using. Please note that by subscribing to this plan you will lose access to #{iflength(features_to_lose)==1,do:"this feature",else:"these features"}."
"if (confirm(\"This plan does not support Custom Properties, which you are currently using. Please note that by subscribing to this plan you will lose access to this feature.\")) {Paddle.Checkout.open"
end
end
describe"for a user with a v4 growth subscription plan"do
@ -257,7 +286,9 @@ defmodule PlausibleWeb.Live.ChoosePlanTest do
])
{:ok,_lv,doc}=get_liveview(conn)
assertdoc=~"You have used <b>2</b>\nbillable pageviews in the last 30 days"
assertdoc=~"You have used"
assertdoc=~"<b>2</b>"
assertdoc=~"billable pageviews in the last 30 days"
end
test"gets default selected interval from current subscription plan",%{conn:conn}do
@ -373,6 +404,49 @@ defmodule PlausibleWeb.Live.ChoosePlanTest do
"if (!confirm(\"This plan does not support Custom Properties and Revenue Goals, which you are currently using. Please note that by subscribing to this plan you will lose access to these features.\")) {e.preventDefault()}"
end
end
describe"for a user with a v3 business (unlimited team members) subscription plan"do