{# Iterates over the user's per-profile Overview layout, rendering one row at a time via per-key partials. `layout` comes from /portfolio/body. Hidden rows are omitted when edit_mode is off (no HTMX request for them). In edit mode (purely client-side via Alpine), hidden rows render as a placeholder users can click to restore. #} {% if oob_subline_html %}{{ oob_subline_html|safe }}{% endif %} {% set _row_templates = { "inbox": "_portfolio_row_inbox.html", "kpis": "_portfolio_row_kpis.html", "curves": "_portfolio_row_curves.html", "monthly_pl": "_portfolio_row_monthly_pl.html", "allocation": "_portfolio_row_allocation.html", "top_movers": "_portfolio_row_top_movers.html", } %}
{% set _visible_count = layout.rows | reject('in', layout.hidden) | list | length %} {% if _visible_count == 0 %}
All Overview rows are hidden. Click Edit layout to restore.
{% endif %} {% for key in layout.rows %} {% set _hidden = key in layout.hidden %} {% if edit_mode or not _hidden %}
{% if _hidden %}
Hidden ยท click eye to restore
{% else %} {% include _row_templates[key] %} {% endif %}
{% endif %} {% endfor %}