{% if not active_locations and not removed_locations %}

No locations added yet

{% else %} {# ─── Active locations (draggable) ─── #} {% if active_locations %}
{% for item in active_locations %}
{{ item.location.name }} {% if item.location.description %}

{{ item.location.description }}

{% endif %} {% if item.location.address %}

{{ item.location.address }}

{% endif %} {% if item.location.coordinates %}

{{ item.location.coordinates }}

{% endif %}
{% if item.event_count is defined and item.location.location_type == 'vibration' %} {{ "{:,}".format(item.event_count) }} event{{ '' if item.event_count == 1 else 's' }} {% else %} Sessions: {{ item.session_count }} {% endif %} {% if item.assignment and item.assigned_unit %} Assigned: {{ item.assigned_unit.id }} {% else %} No active assignment {% endif %}
{% if not item.assignment %} {% endif %}
{% endfor %}
{% endif %} {# ─── Removed locations (collapsed by default) ─── #} {% if removed_locations %}
Removed locations {{ removed_locations | length }}

Historical only — events stay attributed, but no new assignments or schedules can be created here.

{% for item in removed_locations %}
{{ item.location.name }} Removed {{ item.location.removed_at.strftime('%Y-%m-%d') if item.location.removed_at else '—' }}
{% if item.location.removal_reason %}

"{{ item.location.removal_reason }}"

{% endif %} {% if item.location.description %}

{{ item.location.description }}

{% endif %} {% if item.location.address %}

{{ item.location.address }}

{% endif %}
{% if item.event_count is defined and item.location.location_type == 'vibration' %} {{ "{:,}".format(item.event_count) }} historical event{{ '' if item.event_count == 1 else 's' }} {% else %} Historical sessions: {{ item.session_count }} {% endif %}
{% endfor %}
{% endif %} {% endif %}