{% set current_status = deliverable.status %}
{% set found_current = {'val': false} %}
{% for state in main_states %}
{% if not loop.first %}
{% set cs_idx = main_states.index(current_status) if current_status in main_states else -1 %}
{% set st_idx = main_states.index(state) if state in main_states else -1 %}
{% if current_status in main_states %}
{% if main_states.index(state) < main_states.index(current_status) %}
✓
{% elif state == current_status %}
●
{% else %}
{% endif %}
{% elif current_status in branch_states %}
{# When in a branch state, mark up to 'submitted' or 'government_review' as completed #}
{% if state in ['not_started', 'in_progress', 'draft_complete', 'internal_review', 'submitted'] %}
✓
{% elif state == 'government_review' and current_status == 'rejected' %}
✓
{% else %}
{% endif %}
{% else %}
{% endif %}
{{ state_labels[state] }}