{# Plan tab — pooled targets across all accounts, alphabetical sort. #}
{% if plan_view is defined and plan_view and plan_view.rows %}

Position targets

Pooled across accounts · alphabetical · {{ 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 %}
{% for r in plan_view.rows %} {% endfor %}
Symbol Target Current Gap to fill % Filled Last
{{ r.symbol }} {% if r.target_unit.value == 'usd' %}${{ "%.2f"|format(r.target_amount|float) }} {% else %}{{ "%.2f"|format(r.target_amount|float) }} sh{% endif %}
{% if r.target_unit.value == 'usd' %} {% if r.target_share_equiv %}≈ {{ "%.2f"|format(r.target_share_equiv|float) }} sh{% else %}—{% endif %} {% else %} {% if r.target_dollar_equiv %}≈ ${{ "%.2f"|format(r.target_dollar_equiv|float) }}{% else %}—{% endif %} {% endif %}
{% if r.is_held %} ${{ "%.2f"|format(r.current_dollar|float) }}
{{ "%.2f"|format(r.current_shares|float) }} sh
{% else %}
not held
{% endif %}
{% if r.gap_dollar > 0 %}+{% endif %}${{ "%.2f"|format(r.gap_dollar|float) }} {% if r.gap_shares is not none %}
{% if r.gap_shares > 0 %}+{% endif %}{{ "%.2f"|format(r.gap_shares|float) }} sh{% if r.gap_dollar < 0 %} (over){% endif %}
{% endif %}
{% if r.pct_filled is not none %} {% set pct = r.pct_filled|float %} {% set color = 'var(--color-info)' if pct == 0 else ('var(--color-warn)' if pct < 95 else ('var(--color-pos)' if pct <= 105 else 'var(--color-neg)')) %}
{% if pct > 100 %} {# Fully filled bar split into a 'target met' segment + an 'over' segment. The split mark sits at the proportional 100% boundary so the red sliver visually conveys how much past target you are. #}
{% else %}
{% endif %}
{{ "%.0f"|format(pct) }}%
{% else %} {% endif %}
{% if r.last_price %}${{ "%.2f"|format(r.last_price|float) }}{% else %}{% endif %}
{# Footer summary #}
Total planned: ${{ "%.2f"|format(plan_view.total_planned_dollar|float) }} {% if plan_view.planned_rows_with_quote < plan_view.planned_rows_total %} ({{ plan_view.planned_rows_with_quote }}/{{ plan_view.planned_rows_total }} priced) {% endif %} {% if plan_view.total_to_fill_dollar > 0 %} Total to fill: +${{ "%.2f"|format(plan_view.total_to_fill_dollar|float) }} Free cash: ${{ "%.2f"|format(plan_view.free_cash|float) }} {% set cov = plan_view.coverage_pct|float if plan_view.coverage_pct is not none else 0 %} {% set cov_color = 'text-pos' if cov >= 100 else ('text-warn' if cov >= 50 else 'text-neg') %} Coverage: {{ "%.0f"|format(cov) }}%{% if cov < 100 %} — short by ${{ "%.2f"|format((plan_view.total_to_fill_dollar - plan_view.free_cash)|float) }}{% endif %} {% else %} All targets met {% endif %}
{# Pagination footer #} {% if pagination is defined and pagination.total_rows > 0 %}
Showing {{ ((pagination.page - 1) * pagination.page_size) + 1 }}–{{ [pagination.page * pagination.page_size, pagination.total_rows]|min }} of {{ pagination.total_rows }}
{% if pagination.page > 1 %} ← Prev {% else %} ← Prev {% endif %} Page {{ pagination.page }} / {{ pagination.total_pages }} {% if pagination.page < pagination.total_pages %} Next → {% else %} Next → {% endif %}
{% endif %}
{% else %}
No targets yet.
{% endif %}