{% extends "base.html" %} {% block title %}CPMP Portfolio - ICDEV™{% endblock %} {% block content %} {% from "includes/classification_macros.html" import design_classification_banner %} {{ design_classification_banner('CUI') }} {% include "includes/ai_brief_banner.html" ignore missing %}
{{ portfolio.total_contracts | default(0) }}
Total Contracts
{{ portfolio.active_contracts | default(0) }}
Active
${{ '{:,.0f}'.format(portfolio.total_value | default(0)) }}
Total Value
${{ '{:,.0f}'.format(portfolio.burn_rate | default(0)) }}
Burn Rate
{{ portfolio.overdue_deliverables | default(0) }}
Overdue Deliverables
{{ (portfolio.health_distribution.yellow | default(0)) + (portfolio.health_distribution.red | default(0)) }}
At-Risk

Health Distribution

{% set green_count = portfolio.health_distribution.green | default(0) %} {% set yellow_count = portfolio.health_distribution.yellow | default(0) %} {% set red_count = portfolio.health_distribution.red | default(0) %} {% set health_total = green_count + yellow_count + red_count %}
Green
{{ green_count }}
Yellow
{{ yellow_count }}
Red
{{ red_count }}

Contracts

{% for contract in contracts %} {% else %} {% endfor %}
Contract # Title Agency Type Status Health POP End Value CPI SPI
{{ contract.contract_number | default('—') }} {{ contract.title | default('—') }} {{ contract.agency | default('—') }} {{ contract.contract_type | default('—') }} {% set cstatus = contract.status | default('unknown') %} {% set cstatus_colors = {'active': 'success', 'complete': 'info', 'at_risk': 'warning', 'overdue': 'error', 'closed': 'info', 'pending': 'warning'} %} {{ cstatus | replace('_', ' ') | title }} {% set health = contract.health | default('unknown') %} {% if health == 'green' %} Green {% elif health == 'yellow' %} Yellow {% elif health == 'red' %} Red {% else %} {{ health | title }} {% endif %} {{ contract.pop_end | default('—') }} ${{ '{:,.0f}'.format(contract.value | default(0)) }} {% set cpi = contract.cpi %} {% if cpi is not none %} {{ cpi | round(2) }} {% else %} {% endif %} {% set spi = contract.spi %} {% if spi is not none %} {{ spi | round(2) }} {% else %} {% endif %}
No contracts in portfolio.

Program Risk Summary

{% set rs = risk_summary | default({}) %}
{{ rs.total | default(0) }}
Total Risks
{{ rs.open | default(0) }}
Open
{{ rs.critical | default(0) }}
Critical (≥16)
{{ rs.high | default(0) }}
High (11–15)
{% if rs.total | default(0) == 0 %}

No risks registered. Open a contract to add risks.

{% endif %}

Upcoming Deliverables

{% for d in upcoming_deliverables %} {% else %} {% endfor %}
CDRL # Title Contract Due Date Days Until Due Status
{{ d.cdrl_number | default('—') }} {{ d.title | default('—') }} {{ d.contract_number | default('—') }} {{ d.due_date | default('—') }} {% if d.days_until_due is not none %} {{ d.days_until_due | round(0) | int }} {% else %} — {% endif %} {% set dstatus = d.status | default('pending') %} {% set dstatus_colors = {'submitted': 'success', 'approved': 'success', 'in_progress': 'info', 'pending': 'warning', 'overdue': 'error', 'rejected': 'error', 'draft': 'info'} %} {{ dstatus | replace('_', ' ') | title }}
No upcoming deliverables.

Health Matrix

Green   Yellow   Red   No data
Loading…

Option Period Countdown

{% if option_countdown %}
{% for o in option_countdown %} {% set tier = o.risk_tier | default('') %} {% set days = o.days_to_deadline %} {% set tier_styles = { 'critical': 'border-color:#dc3545;background:rgba(220,53,69,0.07);', 'warning': 'border-color:#ffc107;background:rgba(255,193,7,0.07);', 'watch': 'border-color:#4a90d9;background:rgba(74,144,217,0.07);' } %} {% set day_colors = {'critical':'#dc3545','warning':'#ffc107','watch':'#4a90d9'} %}
{{ o.contract_number | default('—') }} — Option {{ o.option_number | default('?') }}
{% if days is not none %}{{ days }}d{% else %}—{% endif %}
to exercise deadline
{{ o.exercise_deadline | default('') }}
{% if o.ceiling_value %}
${{ '{:,.0f}'.format(o.ceiling_value) }}
{% endif %} {% if tier %}
{{ tier | upper }}
{% endif %}
{% endfor %}
{% else %}
No pending option periods tracked. Add them on individual contract pages once the Option Period Tracker is populated.
{% endif %}
{% set iqe_canvas = "cpmp" %} {% set iqe_api_route = "/api/cpmp/iqe-query" %} {% set iqe_title = "Ask the AI — Contract Portfolio" %} {% set iqe_examples = [ {"label": "Active contracts", "query": "show all active contracts with health status"}, {"label": "Low CPI alert", "query": "list contracts where CPI is below 0.9"}, {"label": "CPARS scores", "query": "show latest CPARS assessment for each contract"} ] %} {% include "includes/iqe_query_widget.html" %} {% endblock %}