{# Plan tab — pooled targets across all accounts. KPI strip + tag strip +
sort/filter toolbar above a table of bullet-chart rows with inline tag
chips. #}
{% include "_positions_plan_toolbar.html" %}
{% if plan_view is defined and plan_view and plan_view.rows %}
{% include "_positions_plan_kpi_strip.html" %}
{% if plan_view.tag_summaries %}
{% include "_positions_plan_tag_strip.html" %}
{% endif %}
Pooled across accounts ·
{{ pagination.total_rows if (pagination is defined) else plan_view.rows|length }}
target{% if (pagination.total_rows if (pagination is defined) else plan_view.rows|length) != 1 %}s{% endif %}
{% if plan_view.selected_tag %} · filtered: {{ plan_view.selected_tag }}{% endif %}
{% if plan_view.sort_key == 'manual' %}
Drag handle
{% endif %}
Symbol
Target
Current
Gap to fill
Watch
% Filled
Last
{% for r in plan_view.rows %}
{% include "_positions_plan_row.html" %}
{% endfor %}
{# Pagination footer — shared partial. #}
{% set _qs %}&view=plan{% for _a in selected_accounts | default([]) %}&account={{ _a|urlencode }}{% endfor %}{% if plan_view.selected_tag %}&tag={{ plan_view.selected_tag|urlencode }}{% endif %}{% if plan_view.sort_key and plan_view.sort_key != 'alpha' %}&sort={{ plan_view.sort_key }}{% endif %}{% endset %}
{% set page_base_url = '/positions' %}
{% set page_extra_qs = _qs %}
{% set page_target = '#positions-tab-content' %}
{% set page_swap = 'outerHTML' %}
{% include "_pagination_footer.html" %}
{% else %}
{% if plan_view and plan_view.selected_tag %}
No targets match the {{ plan_view.selected_tag }} filter.
{% else %}
No targets yet.
{% endif %}