Skip to content

Commit

Permalink
Set annual limits to read from the DB
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai committed Dec 4, 2024
1 parent 10033ac commit c626b1b
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions app/templates/views/service-settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,7 @@ <h2 class="heading-small p-0 m-0">{{ _('Your service is in trial mode') }}</h2>
{% call settings_row(if_has_permission='email') %}
{% set txt = _('Annual maximum</br>(April 1 to March 31)') %}
{{ text_field(txt) }}
{# TODO: FF_ANNUAL_LIMIT removal #}
{% if config["FF_ANNUAL_LIMIT"] %}
{% set annual_limit = _('{} emails').format((current_service.email_annual_limit) | format_number) %}
{% else %}
{% set annual_limit = _('{} million emails').format((limits.free_yearly_email//1000000) | format_number) %}
{% endif%}
{% set annual_limit = _('{} emails').format((current_service.email_annual_limit) | format_number) %}
{{ text_field(annual_limit, attributes="data-testid=email-annual-limit") }}
{{ text_field('')}}
{% endcall %}
Expand Down Expand Up @@ -271,12 +266,7 @@ <h2 class="heading-small p-0 m-0">{{ _('Your service is in trial mode') }}</h2>
{% call settings_row(if_has_permission='sms') %}
{% set txt = _('Annual maximum</br>(April 1 to March 31)') %}
{{ text_field(txt) }}
{# TODO: FF_ANNUAL_LIMIT removal #}
{% if config["FF_ANNUAL_LIMIT"] %}
{% set annual_sms_limit = _('{} text messages').format((current_service.sms_annual_limit) | format_number) %}
{% else %}
{% set annual_sms_limit = _('{} text messages').format((limits.free_yearly_sms) | format_number) %}
{% endif%}
{% set annual_sms_limit = _('{} text messages').format((current_service.sms_annual_limit) | format_number) %}
{{ text_field(annual_sms_limit, attributes="data-testid=sms-annual-limit") }}
{{ text_field('')}}
{% endcall %}
Expand Down Expand Up @@ -383,8 +373,6 @@ <h2 class="heading-medium">{{ _('Platform admin settings') }}</h2>
) }}
{% endcall %}

{# TODO: FF_ANNUAL_LIMIT removal #}
{% if config["FF_ANNUAL_LIMIT"] %}
{% call row() %}
{% set txt = _('Annual email limit') %}
{{ text_field(txt)}}
Expand All @@ -408,7 +396,6 @@ <h2 class="heading-medium">{{ _('Platform admin settings') }}</h2>
for=txt
) }}
{% endcall %}
{% endif %}

{% call row() %}
{% set txt = _('API rate limit per minute') %}
Expand Down

0 comments on commit c626b1b

Please sign in to comment.