{% extends "controlpanel/base.html" %} {% load i18n lucide %} {% comment %} Confirm-then-delete for a plan. A real page rather than a modal (unlike every other billing action) because the whole point is naming exactly which clubs are affected, and that list can be long. See billing.services.plans for what "delete" actually does. {% endcomment %} {% block panel_title %}{% blocktrans with plan=plan.name %}Delete “{{ plan }}”{% endblocktrans %}{% endblock panel_title %} {% block breadcrumb %} billing | delete plan | {{ plan.name }} {% endblock breadcrumb %} {% block actions %} {% lucide "arrow-left" size=16 %} {% trans "Back to billing" %} {% endblock actions %} {% block panel %}
{# --- the plan being removed, and which of the two outcomes applies -- #}
{% lucide "triangle-alert" size=20 class="mt-0.5 shrink-0 text-club-dark" %}
{% trans "This can't be undone" %}
{% if impact.will_hard_delete %}

{% blocktrans with plan=plan.name %}“{{ plan }}” has never billed anyone, so the plan will be removed completely.{% endblocktrans %}

{% else %}

{% blocktrans with plan=plan.name %}“{{ plan }}” has billing history, so it will be hidden rather than removed — past invoices will still show what they were billed under.{% endblocktrans %}

{% endif %}
{# --- clubs currently subscribed to this plan -------------------------- #} {% if impact.unsubscribed_clubs %}
{% lucide "building-2" size=16 class="text-club-dark" %} {% blocktrans count counter=impact.unsubscribed_clubs|length %}{{ counter }} club is currently on this plan{% plural %}{{ counter }} clubs are currently on this plan{% endblocktrans %}

{% trans "Deleting this plan removes their subscription outright — each shows as not billed for anything afterwards, the same as a club that was never put on a plan." %}

{% for club in impact.unsubscribed_clubs %} {% endfor %}
{{ club.name }} {% lucide "circle-x" size=11 %} {% trans "Loses this plan" %}
{% endif %} {# --- clubs mid-trial, scheduled to land on this plan ------------------- #} {% if impact.broken_trial_clubs %}
{% lucide "hourglass" size=16 class="text-warn-text" %} {% blocktrans count counter=impact.broken_trial_clubs|length %}{{ counter }} club's trial is scheduled to switch to this plan{% plural %}{{ counter }} clubs' trials are scheduled to switch to this plan{% endblocktrans %}

{% trans "They stay on their current trial plan, but the scheduled switch is cancelled — pick a new plan for them before the trial ends." %}

{% for club in impact.broken_trial_clubs %} {% endfor %}
{{ club.name }} {% lucide "octagon-alert" size=11 %} {% trans "Trial needs a new plan" %}
{% endif %} {% if not impact.has_impact %}
{% lucide "info" size=18 %} {% trans "No club is currently on this plan, or has a trial scheduled to switch to it." %}
{% endif %}
{% csrf_token %} {% lucide "x" size=16 %} {% trans "Cancel" %}
{% endblock panel %}