{% from "components/empty_state.html" import EmptyState %} {% from "components/icon.html" import Icon %} {% from "components/sticky_cta.html" import StickyCTA %} {% extends "portfolios/base.html" %} {% block portfolio_content %} {% macro ViewLink(task_order) %} View {{ Icon("caret_right", classes="icon--tiny") }} {% endmacro %} {% macro TaskOrderList(task_orders, label='success', expired=False, funded=False) %}
{{ caller and caller() }}
!{ col.displayName }
!{ taskOrder.display_status } - {{ Icon('ok') }} Period ending in !{ taskOrder.days_to_expiration } days, but new period funded {{ Icon('alert') }} Period ends in !{ taskOrder.days_to_expiration } days, submit a new task order View {{ Icon("caret_right", classes="icon--tiny") }}
{% endmacro %}
{% call StickyCTA(text="Funding") %}
Start a new task order
{% endcall %} {% for task_order in pending_task_orders %}
Pending
Pending
Started
Value
{{ task_order.budget | dollars }}
{{ ViewLink(task_order) }}
{% endfor %} {% if not active_task_orders and not pending_task_orders %} {{ EmptyState( 'This portfolio doesn’t have any active or pending task orders.', action_label='Add a New Task Order', action_href=url_for('task_orders.new', portfolio_id=portfolio.id), icon='cloud', ) }} {% endif %} {% if active_task_orders %}
Active
{% call TaskOrderList(active_task_orders, label='success', funded=funded) %} Total Active Balance {{ total_balance | dollars }}   {% endcall %} {% endif %} {% if expired_task_orders %}
Expired
{{ TaskOrderList(expired_task_orders, label='expired', expired=True) }} {% endif %}
{% endblock %}