diff --git a/atst/routes/portfolios/task_orders.py b/atst/routes/portfolios/task_orders.py index 120108e5..8cde94c9 100644 --- a/atst/routes/portfolios/task_orders.py +++ b/atst/routes/portfolios/task_orders.py @@ -42,6 +42,7 @@ def portfolio_funding(portfolio_id): if active_task_orders else None ) + funded = len(active_task_orders) > 1 total_balance = sum([task_order["balance"] for task_order in active_task_orders]) return render_template( @@ -51,6 +52,7 @@ def portfolio_funding(portfolio_id): active_task_orders=active_task_orders, expired_task_orders=task_orders_by_status.get(TaskOrderStatus.EXPIRED, []), funding_end_date=funding_end_date, + funded=funded, total_balance=total_balance, ) diff --git a/js/components/tables/task_order_list.js b/js/components/tables/task_order_list.js index b511508f..effe3567 100644 --- a/js/components/tables/task_order_list.js +++ b/js/components/tables/task_order_list.js @@ -21,6 +21,7 @@ export default { props: { data: Array, expired: Boolean, + funded: Boolean, }, components: { diff --git a/styles/components/_portfolio_layout.scss b/styles/components/_portfolio_layout.scss index 6b546805..e74481a3 100644 --- a/styles/components/_portfolio_layout.scss +++ b/styles/components/_portfolio_layout.scss @@ -50,6 +50,13 @@ @include icon-color($color-green); } } + + .unfunded { + color: $color-red; + .icon { + @include icon-color($color-red); + } + } } .pending-task-order { @@ -127,24 +134,36 @@ background-color: $color-gray-light; } - .to-expiring-soon { - font-weight: $font-bold; - font-size: 1.5rem; - margin-left: $gap; + .to-performance-period { + &.to-expiring-soon { - &.funded { - color: $color-blue; - - .icon { - @include icon-color($color-blue); + .to-expiration-alert { + font-weight: $font-bold; + font-size: 1.5rem; + margin-left: $gap; } - } - &.unfunded { - color: $color-red; + &.funded .to-expiration-alert { + color: $color-blue; - .icon { - @include icon-color($color-red); + + .icon { + @include icon-color($color-blue); + } + } + + &.unfunded { + .to-expiration-alert { + color: $color-red; + } + + .icon { + @include icon-color($color-red); + } + + .to-end-date { + color: $color-red; + } } } } diff --git a/templates/portfolios/task_orders/index.html b/templates/portfolios/task_orders/index.html index f3b2f765..58b5704f 100644 --- a/templates/portfolios/task_orders/index.html +++ b/templates/portfolios/task_orders/index.html @@ -12,7 +12,7 @@ {% endmacro %} -{% macro TaskOrderList(task_orders, label='success', expired=False) %} +{% macro TaskOrderList(task_orders, label='success', expired=False, funded=False) %} !{ taskOrder.display_status } - + @@ -51,17 +51,19 @@ - + format="M/D/YYYY" + class="to-end-date" + > + v-if="taskOrder.days_to_expiration > 0 && taskOrder.days_to_expiration <= 30 && funded" + class="to-expiration-alert"> {{ 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 + v-if="taskOrder.days_to_expiration > 0 && taskOrder.days_to_expiration <= 30 && !funded" + class="to-expiration-alert"> + {{ Icon('alert') }} Period ends in !{ taskOrder.days_to_expiration } days, submit a new task order
@@ -89,15 +91,22 @@

Portfolio Funding

-
- {% if funding_end_date %} +
+ {% if funding_end_date and funded %} {{ Icon('ok') }} Funded through - - {% endif %} + + {% elif funding_end_date and not funded %} + {{ Icon('alert') }} + Funded period ends + + + {% endif %}
Start a New Task Order
@@ -136,7 +145,7 @@ {% endif %} {% if active_task_orders %} - {{ TaskOrderList(active_task_orders, label='success') }} + {{ TaskOrderList(active_task_orders, label='success', funded=funded) }}
{{ total_balance | dollars }}