support: Show current discount for current plan.

This should match any discount information shown for the remote
realm or server.
This commit is contained in:
Lauryn Menard
2023-12-15 17:16:39 +01:00
committed by Tim Abbott
parent be6c90f608
commit a8172591ca
7 changed files with 44 additions and 7 deletions

View File

@@ -10,6 +10,9 @@
{% if plan_data.current_plan.tier == plan_data.current_plan.TIER_SELF_HOSTED_COMMUNITY %}
<!-- Any data below doesn't makes sense for sponsored organizations. -->
{% else %}
{% if plan_data.current_plan.discount %}
<b>Discount</b>: {{ format_discount(plan_data.current_plan.discount) }}%<br />
{% endif %}
{% if plan_data.is_legacy_plan %}
<b>End date</b>: {{ plan_data.current_plan.end_date.strftime('%d %B %Y') }}<br />
{% else %}

View File

@@ -113,6 +113,7 @@
<div class="current-plan-details">
{% with %}
{% set plan_data = plan_data[realm.id] %}
{% set format_discount = format_discount %}
{% include 'analytics/current_plan_details.html' %}
{% endwith %}
</div>

View File

@@ -27,6 +27,7 @@
<div class="remote-realm-information">
{% with %}
{% set plan_data = support_data[remote_realm.id].plan_data %}
{% set format_discount = format_discount %}
{% include 'analytics/current_plan_details.html' %}
{% endwith %}
</div>

View File

@@ -69,6 +69,7 @@
<div class="remote-server-information">
{% with %}
{% set plan_data = remote_servers_support_data[remote_server.id].plan_data %}
{% set format_discount = format_discount %}
{% include 'analytics/current_plan_details.html' %}
{% endwith %}
</div>
@@ -87,6 +88,7 @@
{% with %}
{% set support_data = remote_realms_support_data %}
{% set get_plan_type_name = get_plan_type_name %}
{% set format_discount = format_discount %}
{% include "analytics/remote_realm_details.html" %}
{% endwith %}
</div>

View File

@@ -49,7 +49,10 @@
</form>
<hr />
<div>
{% include "analytics/realm_details.html" %}
{% with %}
{% set format_discount = format_discount %}
{% include "analytics/realm_details.html" %}
{% endwith %}
</div>
<hr />
</div>
@@ -57,7 +60,10 @@
{% for realm in realms %}
<div class="support-query-result">
{% include "analytics/realm_details.html" %}
{% with %}
{% set format_discount = format_discount %}
{% include "analytics/realm_details.html" %}
{% endwith %}
</div>
{% endfor %}
@@ -106,7 +112,10 @@
{% if show_realm_details %}
<hr />
<div>
{% include "analytics/realm_details.html" %}
{% with %}
{% set format_discount = format_discount %}
{% include "analytics/realm_details.html" %}
{% endwith %}
</div>
{% elif realm %}
<b>Realm</b>: {{ realm.string_id }}