diff --git a/atst/routes/task_orders/index.py b/atst/routes/task_orders/index.py index e02780ca..04f1baaa 100644 --- a/atst/routes/task_orders/index.py +++ b/atst/routes/task_orders/index.py @@ -8,16 +8,16 @@ from atst.forms.task_order import SignatureForm from atst.models import Permissions -@task_orders_bp.route("/task_orders//review") -@user_can(Permissions.VIEW_TASK_ORDER_DETAILS, message="review task order details") -def review_task_order(task_order_id): +@task_orders_bp.route("/task_orders/") +@user_can(Permissions.VIEW_TASK_ORDER_DETAILS, message="view task order details") +def view_task_order(task_order_id): task_order = TaskOrders.get(task_order_id) if task_order.is_draft: return redirect(url_for("task_orders.edit", task_order_id=task_order.id)) else: signature_form = SignatureForm() return render_template( - "task_orders/review.html", + "task_orders/view.html", task_order=task_order, signature_form=signature_form, ) diff --git a/styles/components/_portfolio_layout.scss b/styles/components/_portfolio_layout.scss index 0da98f17..d7583b80 100644 --- a/styles/components/_portfolio_layout.scss +++ b/styles/components/_portfolio_layout.scss @@ -607,3 +607,28 @@ margin-right: $gap * 3; } } + +.summary-item { + border-right: 1px solid $color-gray-light; + margin-right: $gap * 3; + padding-right: $gap * 3; + &:last-child { + border-right: none; + margin-right: 0; + padding-right: 0; + } + &__header { + margin: 0; + &-icon { + margin: 0; + padding: 0; + } + } + &__value { + font-size: $lead-font-size; + &--large { + font-size: 3.4rem; + font-weight: $font-bold; + } + } +} diff --git a/styles/components/_sticky_cta.scss b/styles/components/_sticky_cta.scss index ce05144f..a62dc326 100644 --- a/styles/components/_sticky_cta.scss +++ b/styles/components/_sticky_cta.scss @@ -63,4 +63,8 @@ font-size: $small-font-size; font-weight: $font-bold; } + + &--link { + font-weight: $font-bold; + } } diff --git a/styles/elements/_tables.scss b/styles/elements/_tables.scss index f313756c..182b7770 100644 --- a/styles/elements/_tables.scss +++ b/styles/elements/_tables.scss @@ -53,7 +53,6 @@ table.atat-table { padding: $gap * 2; border: 1px solid $color-gray-lighter; display: table-cell; - white-space: nowrap; vertical-align: top; &:first-child { @@ -64,6 +63,12 @@ table.atat-table { border-right: none; } } + + &:last-child { + td { + border-bottom: none; + } + } } } diff --git a/styles/sections/_reports.scss b/styles/sections/_reports.scss index ee43ffa2..699daac6 100644 --- a/styles/sections/_reports.scss +++ b/styles/sections/_reports.scss @@ -118,27 +118,6 @@ } } - .reporting-summary-item { - border-right: 1px solid $color-gray-light; - margin-right: $gap * 3; - padding-right: $gap * 3; - &:last-child { - border-right: none; - margin-right: 0; - padding-right: 0; - } - &__header { - margin: 0; - &-icon { - margin: 0; - padding: 0; - } - } - &__value { - font-size: $lead-font-size; - } - } - .reporting-expended-funding { &__header { margin: 0; diff --git a/styles/sections/_task_order.scss b/styles/sections/_task_order.scss index c09f49a7..62d0db08 100644 --- a/styles/sections/_task_order.scss +++ b/styles/sections/_task_order.scss @@ -36,22 +36,6 @@ margin-top: $gap * 2; } - .task-order__review { - .h2 { - margin-bottom: $gap * 4; - } - - .task-order__number { - text-align: right; - } - - .totals-box { - flex-grow: unset; - display: table; - min-width: 350px; - } - } - .card { padding: ($gap * 4) ($gap * 5) 0; diff --git a/templates/components/tooltip.html b/templates/components/tooltip.html index 08a6f92f..052299f6 100644 --- a/templates/components/tooltip.html +++ b/templates/components/tooltip.html @@ -3,7 +3,7 @@ {% macro Tooltip(message,title='Help', classes="") %} {%- endmacro %} diff --git a/templates/portfolios/header.html b/templates/portfolios/header.html index 63684d92..71d9a550 100644 --- a/templates/portfolios/header.html +++ b/templates/portfolios/header.html @@ -30,7 +30,7 @@ icon='funding', text='navigation.portfolio_navigation.breadcrumbs.funding' | translate, url=url_for("task_orders.portfolio_funding", portfolio_id=portfolio.id), - active=request.url_rule.endpoint in ["task_orders.portfolio_funding", "task_orders.review_task_order", "task_orders.form_step_one_add_pdf", "task_orders.submit_form_step_one_add_pdf", "task_orders.form_step_two_add_number", "task_orders.submit_form_step_two_add_number", "task_orders.form_step_three_add_clins", "task_orders.submit_form_step_three_add_clins", "task_orders.form_step_four_review", "task_orders.form_step_five_confirm_signature"], + active=request.url_rule.endpoint in ["task_orders.portfolio_funding", "task_orders.view_task_order", "task_orders.form_step_one_add_pdf", "task_orders.submit_form_step_one_add_pdf", "task_orders.form_step_two_add_number", "task_orders.submit_form_step_two_add_number", "task_orders.form_step_three_add_clins", "task_orders.submit_form_step_three_add_clins", "task_orders.form_step_four_review", "task_orders.form_step_five_confirm_signature"], ) }} {% endif %} {{ Link( diff --git a/templates/portfolios/reports/expired_task_orders.html b/templates/portfolios/reports/expired_task_orders.html index a7acdc5e..dcde6683 100644 --- a/templates/portfolios/reports/expired_task_orders.html +++ b/templates/portfolios/reports/expired_task_orders.html @@ -23,7 +23,7 @@ {% for task_order in expired_task_orders %} - Task Order + Task Order {{ task_order.number }} {{ Icon("caret_right", classes="icon--tiny icon--blue" ) }} diff --git a/templates/portfolios/reports/obligated_funds.html b/templates/portfolios/reports/obligated_funds.html index 43046472..e0f11792 100644 --- a/templates/portfolios/reports/obligated_funds.html +++ b/templates/portfolios/reports/obligated_funds.html @@ -67,7 +67,7 @@ Active Task Orders {% for task_order in portfolio.active_task_orders %} - + {{ task_order.number }} {{ Icon("caret_right", classes="icon--tiny icon--blue" ) }} {% endfor %} diff --git a/templates/portfolios/reports/portfolio_summary.html b/templates/portfolios/reports/portfolio_summary.html index 55922812..432ad28e 100644 --- a/templates/portfolios/reports/portfolio_summary.html +++ b/templates/portfolios/reports/portfolio_summary.html @@ -3,34 +3,34 @@
-
-
- Total Portfolio Value - {{Tooltip(("common.lorem" | translate), title="", classes="reporting-summary-item__header-icon")}} +
+
+ Total Portfolio Value + {{Tooltip(("common.lorem" | translate), title="", classes="summary-item__header-icon")}}
-

{{ total_portfolio_value | dollars }}

+

{{ total_portfolio_value | dollars }}

-
-
- Funding Duration - {{Tooltip(("common.lorem" | translate), title="", classes="reporting-summary-item__header-icon")}} +
+
+ Funding Duration + {{Tooltip(("common.lorem" | translate), title="", classes="summary-item__header-icon")}}
{% set earliest_pop_start_date, latest_pop_end_date = portfolio.funding_duration %} {% if earliest_pop_start_date and latest_pop_end_date %} -

+

{{ earliest_pop_start_date | formattedDate(formatter="%B %d, %Y") }} - - + - {{ latest_pop_end_date | formattedDate(formatter="%B %d, %Y") }}

{% else %} -

-

+

-

{% endif %}
-
-
- Days Remaining - {{Tooltip(("common.lorem" | translate), title="", classes="reporting-summary-item__header-icon")}} +
+
+ Days Remaining + {{Tooltip(("common.lorem" | translate), title="", classes="summary-item__header-icon")}}
-

{{ portfolio.days_to_funding_expiration }} days

+

{{ portfolio.days_to_funding_expiration }} days

-
\ No newline at end of file + diff --git a/templates/task_orders/builder_base.html b/templates/task_orders/builder_base.html index 70bc20c9..f5b88c3a 100644 --- a/templates/task_orders/builder_base.html +++ b/templates/task_orders/builder_base.html @@ -9,7 +9,7 @@ {{ form.csrf_token }} {{ StickyCTA( - text='task_orders.form.sticky_header_text' | translate, + text=sticky_cta_text, context=('task_orders.form.sticky_header_context' | translate({"step": step}) )) }} {% call Modal(name='cancel', dismissable=True) %} diff --git a/templates/task_orders/fragments/task_order_review.html b/templates/task_orders/fragments/task_order_review.html deleted file mode 100644 index a97d8e09..00000000 --- a/templates/task_orders/fragments/task_order_review.html +++ /dev/null @@ -1,82 +0,0 @@ -{% from "components/icon.html" import Icon %} -{% from "components/semi_collapsible_text.html" import SemiCollapsibleText %} - - -
-
-
-
- {{ "task_orders.review.review_your_funding" | translate }} -
-
-
- {% if task_order %} - {% set obligated_funds = task_order.total_obligated_funds %} - {% set contract_amount = task_order.total_contract_amount %} - {% endif %} - -
{{ 'components.totals_box.obligated_funds' | translate }}
-
{{ obligated_funds | dollars }}
-

{{ 'components.totals_box.obligated_text' | translate }}

-
{{ 'components.totals_box.total_amount' | translate }}
-
{{ contract_amount | dollars }}
-

{{ 'components.totals_box.total_text' | translate }}

- -
-
- -
- {{ 'task_orders.review.pdf_title' | translate }} -
- - {{ Icon('ok') }} - {{ task_order.pdf.filename }} - - -
- -
-
- {{ "task_orders.review.task_order_number" | translate }} -
-
{{task_order.number}}
- -
- -
- {{ "task_orders.review.funding_summary" | translate }} -
- - - - - - - - - - - - - - - - {% for clin in task_order.sorted_clins %} - - - - - - {# TODO: Swap in total CLIN amount #} - - - - {% endfor %} - -
{{ "task_orders.review.clins.number" | translate }}{{ "task_orders.review.clins.type" | translate }}{{ "task_orders.review.clins.idiq_clin_description" | translate }}{{ "task_orders.review.clins.pop" | translate }}{{ "task_orders.review.clins.total_amount" | translate }}{{ "task_orders.review.clins.obligated" | translate }}
{{ clin.number }}{{ clin.type }}{{ "{}".format(clin.jedi_clin_type) | translate}} - {{ clin.start_date | formattedDate }} - {{ clin.end_date | formattedDate }} - {{ clin.total_amount | dollars }}{{ clin.obligated_amount | dollars }}
-
-
-
-
diff --git a/templates/task_orders/fragments/task_order_view.html b/templates/task_orders/fragments/task_order_view.html new file mode 100644 index 00000000..1930c248 --- /dev/null +++ b/templates/task_orders/fragments/task_order_view.html @@ -0,0 +1,90 @@ +{% from "components/icon.html" import Icon %} +{% from "components/semi_collapsible_text.html" import SemiCollapsibleText %} +{% from "components/tooltip.html" import Tooltip %} + +{% macro TaskOrderView(task_order, portfolio, builder_mode=False) %} + {% set obligated_funds = task_order.total_obligated_funds %} + {% set contract_amount = task_order.total_contract_amount %} + {% set expended_funds = task_order.invoiced_funds %} + +
+
+
+

+ Total obligated funds + {{ Tooltip(("task_orders.review.tooltip.obligated_funds" | translate), title="", classes="summary-item__header-icon") }} +

+

+ {{ obligated_funds | dollars }} +

+
+
+

+ Total Task Order value + {{ Tooltip(("task_orders.review.tooltip.total_value" | translate), title="", classes="summary-item__header-icon") }} +

+ {% set earliest_pop_start_date, latest_pop_end_date = portfolio.funding_duration %} + {% if earliest_pop_start_date and latest_pop_end_date %} +

+ {{ contract_amount | dollars }} +

+ {% else %} +

-

+ {% endif %} +
+
+

+ Total expended funds + {{ Tooltip(("task_orders.review.tooltip.expended_funds" | translate), title="", classes="summary-item__header-icon") }} +

+

+ {{ expended_funds | dollars }} +

+
+
+
+
+

Documents

+
+ {% if builder_mode %} + {{ Icon('ok', classes="icon--green icon--medium") }} + {% endif %} + + {{ task_order.pdf.filename }} + {{ Icon('link', classes="icon--primary icon--medium") }} + +
+
+
+
+

CLIN summary

+ + + + + + + + + + + + + + {% for clin in task_order.sorted_clins %} + + + + + + + + + {% endfor %} + +
{{ "task_orders.review.clins.number" | translate }}{{ "task_orders.review.clins.type" | translate }}{{ "task_orders.review.clins.idiq_clin_description" | translate }}{{ "task_orders.review.clins.pop" | translate }}{{ "task_orders.review.clins.total_amount" | translate }}{{ "task_orders.review.clins.obligated" | translate }}
{{ clin.number }}{{ clin.type }}{{ "{}".format(clin.jedi_clin_type) | translate}} + {{ clin.start_date | formattedDate }} - {{ clin.end_date | formattedDate }} + {{ clin.total_amount | dollars }}{{ clin.obligated_amount | dollars }}
+
+
+{% endmacro %} diff --git a/templates/task_orders/index.html b/templates/task_orders/index.html index 160fb483..5926ff60 100644 --- a/templates/task_orders/index.html +++ b/templates/task_orders/index.html @@ -26,7 +26,7 @@ {% endif %} {% endset %}
-

{{ to_number }} {{ Icon("caret_right", classes="icon--tiny icon--primary" ) }}

+

{{ to_number }} {{ Icon("caret_right", classes="icon--tiny icon--primary" ) }}

{% if status != 'Expired' -%}
diff --git a/templates/task_orders/review.html b/templates/task_orders/review.html deleted file mode 100644 index 39fd8128..00000000 --- a/templates/task_orders/review.html +++ /dev/null @@ -1,16 +0,0 @@ -{% from "components/sticky_cta.html" import StickyCTA %} - -{% extends 'portfolios/base.html' %} - -{% block portfolio_content %} - - {% call StickyCTA(text="Task order details") %} - {% if user_can(permissions.EDIT_TASK_ORDER_DETAILS) and not task_order.is_expired %} - Edit - {% endif %} - {% endcall %} - -
- {% include "task_orders/fragments/task_order_review.html" %} -
-{% endblock %} diff --git a/templates/task_orders/step_1.html b/templates/task_orders/step_1.html index 59e88a89..59c0df70 100644 --- a/templates/task_orders/step_1.html +++ b/templates/task_orders/step_1.html @@ -12,6 +12,7 @@ {% set next_button_text = "Next: Add TO Number" %} {% set step = "1" %} +{% set sticky_cta_text = 'task_orders.form.sticky_header_text' | translate %} {% block to_builder_form_field %} {{ TOFormStepHeader( diff --git a/templates/task_orders/step_2.html b/templates/task_orders/step_2.html index 86e9bf5b..1a5b0c42 100644 --- a/templates/task_orders/step_2.html +++ b/templates/task_orders/step_2.html @@ -7,6 +7,7 @@ {% set next_button_text = "Next: Add Base CLIN" %} {% set previous_button_link = url_for("task_orders.form_step_one_add_pdf", task_order_id=task_order_id) %} {% set step = "2" %} +{% set sticky_cta_text = 'task_orders.form.sticky_header_text' | translate %} {% block to_builder_form_field %} {{ TOFormStepHeader( diff --git a/templates/task_orders/step_3.html b/templates/task_orders/step_3.html index e5c96581..b1788b51 100644 --- a/templates/task_orders/step_3.html +++ b/templates/task_orders/step_3.html @@ -8,6 +8,7 @@ {% set next_button_text = "task_orders.form.step_3.next_button" | translate %} {% set previous_button_link = url_for("task_orders.form_step_two_add_number", task_order_id=task_order_id) %} {% set step = "3" %} +{% set sticky_cta_text = 'task_orders.form.sticky_header_text' | translate %} {% block to_builder_form_field %} diff --git a/templates/task_orders/step_4.html b/templates/task_orders/step_4.html index 86006054..c862ad94 100644 --- a/templates/task_orders/step_4.html +++ b/templates/task_orders/step_4.html @@ -1,17 +1,20 @@ {% extends "task_orders/builder_base.html" %} +{% from "task_orders/fragments/task_order_view.html" import TaskOrderView %} + {% set action = url_for('task_orders.form_step_five_confirm_signature', task_order_id=task_order_id) %} {% set previous_button_link = url_for("task_orders.form_step_three_add_clins", task_order_id=task_order_id) %} {% set step = "4" %} +{% set sticky_cta_text = 'task_orders.form.sticky_header_review_text' | translate %} {% block next_button %} - Next: Submit Task Order + Next: Confirm {% endblock %} {% block to_builder_form_field %} - {% include "task_orders/fragments/task_order_review.html" %} + {{ TaskOrderView(task_order, portfolio, builder_mode=True) }} {% endblock %} diff --git a/templates/task_orders/step_5.html b/templates/task_orders/step_5.html index 1b998ad9..ac40993a 100644 --- a/templates/task_orders/step_5.html +++ b/templates/task_orders/step_5.html @@ -8,6 +8,7 @@ {% set next_button_text = 'task_orders.form.step_5.next_button' | translate %} {% set previous_button_link = url_for("task_orders.form_step_four_review", task_order_id=task_order_id) %} {% set step = "5" %} +{% set sticky_cta_text = 'task_orders.form.sticky_header_text' | translate %} {% block to_builder_form_field %} {{ TOFormStepHeader( diff --git a/templates/task_orders/view.html b/templates/task_orders/view.html new file mode 100644 index 00000000..e5662472 --- /dev/null +++ b/templates/task_orders/view.html @@ -0,0 +1,17 @@ +{% from "components/sticky_cta.html" import StickyCTA %} +{% from "task_orders/fragments/task_order_view.html" import TaskOrderView %} + +{% extends 'portfolios/base.html' %} + +{% block portfolio_content %} + + {% call StickyCTA(text="Task Order #{}".format(task_order.number)) %} + {% if user_can(permissions.EDIT_TASK_ORDER_DETAILS) and not task_order.is_expired %} + Correct an Error + {% endif %} + {% endcall %} + +
+ {{ TaskOrderView(task_order, portfolio) }} +
+{% endblock %} diff --git a/tests/routes/task_orders/test_index.py b/tests/routes/task_orders/test_index.py index 48d8bd6b..e9b81f7a 100644 --- a/tests/routes/task_orders/test_index.py +++ b/tests/routes/task_orders/test_index.py @@ -35,22 +35,22 @@ def task_order(): return task_order -def test_review_task_order_not_draft(client, user_session, task_order): +def test_view_task_order_not_draft(client, user_session, task_order): TaskOrders.sign(task_order=task_order, signer_dod_id=random_dod_id()) user_session(task_order.portfolio.owner) response = client.get( - url_for("task_orders.review_task_order", task_order_id=task_order.id) + url_for("task_orders.view_task_order", task_order_id=task_order.id) ) assert response.status_code == 200 -def test_review_task_order_draft(client, user_session, task_order): +def test_view_task_order_draft(client, user_session, task_order): TaskOrders.update( task_order_id=task_order.id, number="1234567890", clins=[], pdf=None ) user_session(task_order.portfolio.owner) response = client.get( - url_for("task_orders.review_task_order", task_order_id=task_order.id) + url_for("task_orders.view_task_order", task_order_id=task_order.id) ) assert response.status_code == 302 assert url_for("task_orders.edit", task_order_id=task_order.id) in response.location diff --git a/translations.yaml b/translations.yaml index b4a127a8..e25078a6 100644 --- a/translations.yaml +++ b/translations.yaml @@ -491,6 +491,10 @@ task_orders: pop: PoP total_amount: CLIN Value obligated: Amount Obligated + tooltip: + obligated_funds: Funds committed to fund your portfolio. This may represent 100% of your total Task Order value, or a portion of it. + total_value: All obligated and projected funds for the Task Order’s Base and Option CLINs. + expended_funds: All funds spend from the Task Order so far. form: add_clin: Add another CLIN add_to_header: Add your task order @@ -527,7 +531,8 @@ task_orders: description: Prior to submitting the Task Order, you must acknowledge, by marking the appropriate box below, that the uploaded Task Order is signed by an appropriate, duly warranted Contracting Officer who has the authority to execute the uploaded Task Order on your Agency’s behalf and has authorized you to upload the Task Order in accordance with Agency policy and procedures. You must further acknowledge, by marking the appropriate box below, that all information entered herein matches that of the submitted Task Order. alert_message: All task orders require a Contracting Officer signature. next_button: 'Confirm & Submit' - sticky_header_text: 'Add Task Order' + sticky_header_text: 'Add a Task Order' + sticky_header_review_text: Review Changes sticky_header_context: 'Step {step} of 5' empty_state: header: Add approved task orders @@ -549,10 +554,10 @@ task_orders: status_empty_state: 'This Portfolio has no {status} Task Orders.' status_list_title: '{status} Task Orders' JEDICLINType: - JEDI_CLIN_1: 'IDIQ CLIN 0001 Unclassified IaaS/PaaS' - JEDI_CLIN_2: 'IDIQ CLIN 0002 Classified IaaS/PaaS' - JEDI_CLIN_3: 'IDIQ CLIN 0003 Unclassified Cloud Support Package' - JEDI_CLIN_4: 'IDIQ CLIN 0004 Classified Cloud Support Package' + JEDI_CLIN_1: 'Unclassified IaaS and PaaS (IDIQ CLIN 0001)' + JEDI_CLIN_2: 'Classified IaaS and PaaS (IDIQ CLIN 0002)' + JEDI_CLIN_3: 'Unclassified Cloud Support Package (IDIQ CLIN 0003)' + JEDI_CLIN_4: 'Classified Cloud Support Package (IDIQ CLIN 0004)' testing: example_string: Hello World example_with_variables: 'Hello, {name}!'