mirror of
https://github.com/plausible/analytics.git
synced 2024-12-14 19:33:42 +03:00
9476ccf95c
* Add yearly billing options * Add new subscription names * Add note about yearly billing in the email * Add a test for change_plan function * Add allowance function back in * Test billing controller endpoint
22 lines
396 B
Elixir
22 lines
396 B
Elixir
defmodule PlausibleWeb.BillingView do
|
|
use PlausibleWeb, :view
|
|
|
|
def present_date(date) do
|
|
Date.from_iso8601!(date)
|
|
|> Timex.format!("{D} {Mshort} {YYYY}")
|
|
end
|
|
|
|
def reccommended_plan(usage) do
|
|
cond do
|
|
usage < 9000 ->
|
|
"10k / mo"
|
|
usage < 90_000 ->
|
|
"100k / mo"
|
|
usage < 900_000 ->
|
|
"1m / mo"
|
|
true ->
|
|
"custom"
|
|
end
|
|
end
|
|
end
|