From cbcac2b142149f8dd67e2756197192ead3c1babe Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Thu, 19 Dec 2019 14:28:00 -0500 Subject: [PATCH 1/6] Rename review route and template to view because it better reflects the purpose of the route and template --- atst/routes/task_orders/index.py | 4 ++-- templates/portfolios/header.html | 2 +- templates/portfolios/reports/expired_task_orders.html | 2 +- templates/portfolios/reports/obligated_funds.html | 2 +- .../{task_order_review.html => task_order_view.html} | 0 templates/task_orders/index.html | 2 +- templates/task_orders/review.html | 2 +- templates/task_orders/step_4.html | 2 +- tests/routes/task_orders/test_index.py | 8 ++++---- 9 files changed, 12 insertions(+), 12 deletions(-) rename templates/task_orders/fragments/{task_order_review.html => task_order_view.html} (100%) diff --git a/atst/routes/task_orders/index.py b/atst/routes/task_orders/index.py index e02780ca..5302cf88 100644 --- a/atst/routes/task_orders/index.py +++ b/atst/routes/task_orders/index.py @@ -8,9 +8,9 @@ from atst.forms.task_order import SignatureForm from atst.models import Permissions -@task_orders_bp.route("/task_orders//review") +@task_orders_bp.route("/task_orders/") @user_can(Permissions.VIEW_TASK_ORDER_DETAILS, message="review task order details") -def review_task_order(task_order_id): +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)) 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/task_orders/fragments/task_order_review.html b/templates/task_orders/fragments/task_order_view.html similarity index 100% rename from templates/task_orders/fragments/task_order_review.html rename to templates/task_orders/fragments/task_order_view.html 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 index 39fd8128..e6aa8510 100644 --- a/templates/task_orders/review.html +++ b/templates/task_orders/review.html @@ -11,6 +11,6 @@ {% endcall %}
- {% include "task_orders/fragments/task_order_review.html" %} + {% include "task_orders/fragments/task_order_view.html" %}
{% endblock %} diff --git a/templates/task_orders/step_4.html b/templates/task_orders/step_4.html index 86006054..c76c0c73 100644 --- a/templates/task_orders/step_4.html +++ b/templates/task_orders/step_4.html @@ -13,5 +13,5 @@ {% endblock %} {% block to_builder_form_field %} - {% include "task_orders/fragments/task_order_review.html" %} + {% include "task_orders/fragments/task_order_view.html" %} {% 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 From 8ece47627ef4694f3cfc79f2d054864932dcf795 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Mon, 23 Dec 2019 10:33:20 -0500 Subject: [PATCH 2/6] Initial styling and layout of TO view fragment --- styles/elements/_tables.scss | 7 +- styles/sections/_reports.scss | 46 +++--- styles/sections/_task_order.scss | 16 -- templates/components/tooltip.html | 2 +- .../fragments/task_order_view.html | 155 +++++++++--------- translations.yaml | 12 +- 6 files changed, 120 insertions(+), 118 deletions(-) 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..66cdb073 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; @@ -167,3 +146,28 @@ } } } + +.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; + &--large { + font-size: 3.4rem; + font-weight: $font-bold; + } + } +} 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/task_orders/fragments/task_order_view.html b/templates/task_orders/fragments/task_order_view.html index a97d8e09..70d4c385 100644 --- a/templates/task_orders/fragments/task_order_view.html +++ b/templates/task_orders/fragments/task_order_view.html @@ -1,82 +1,87 @@ {% from "components/icon.html" import Icon %} {% from "components/semi_collapsible_text.html" import SemiCollapsibleText %} +{% from "components/tooltip.html" import Tooltip %} -
-
-
-
- {{ "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 %} +{% set obligated_funds = task_order.total_obligated_funds %} +{% set contract_amount = task_order.total_contract_amount %} +{% set expended_funds = task_order.invoiced_funds %} -
{{ '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 }}
-
+
+
+
+

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

+

+ {{ obligated_funds | dollars }} +

-
+
+

+ Total Task Order value + {{ Tooltip(("task_orders.review.tooltip.total_value" | translate), title="", classes="reporting-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="reporting-summary-item__header-icon") }} +

+

+ {{ expended_funds | dollars }} +

+
+ +
+
+

Documents

+ +
+
+
+

CLIN summary

+ + + + + + + + + + + + + + {% 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/translations.yaml b/translations.yaml index b4a127a8..d14a378b 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 @@ -549,10 +553,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}!' From 2e088d131674a38961ae6dffcb8bcb76a0fbb26c Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Mon, 23 Dec 2019 11:26:35 -0500 Subject: [PATCH 3/6] Rename view TO file and update sticky header --- atst/routes/task_orders/index.py | 4 ++-- styles/components/_sticky_cta.scss | 4 ++++ templates/task_orders/{review.html => view.html} | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) rename templates/task_orders/{review.html => view.html} (64%) diff --git a/atst/routes/task_orders/index.py b/atst/routes/task_orders/index.py index 5302cf88..04f1baaa 100644 --- a/atst/routes/task_orders/index.py +++ b/atst/routes/task_orders/index.py @@ -9,7 +9,7 @@ from atst.models import Permissions @task_orders_bp.route("/task_orders/") -@user_can(Permissions.VIEW_TASK_ORDER_DETAILS, message="review task order details") +@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: @@ -17,7 +17,7 @@ def view_task_order(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/_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/templates/task_orders/review.html b/templates/task_orders/view.html similarity index 64% rename from templates/task_orders/review.html rename to templates/task_orders/view.html index e6aa8510..0681dfae 100644 --- a/templates/task_orders/review.html +++ b/templates/task_orders/view.html @@ -4,9 +4,9 @@ {% block portfolio_content %} - {% call StickyCTA(text="Task order details") %} + {% call StickyCTA(text="Task Order #{}".format(task_order.number)) %} {% if user_can(permissions.EDIT_TASK_ORDER_DETAILS) and not task_order.is_expired %} - Edit + Correct an Error {% endif %} {% endcall %} From e25f519243040797d06540ced134460bc03b476d Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Mon, 23 Dec 2019 11:44:53 -0500 Subject: [PATCH 4/6] Change TO fragment to a macro to make it reusable in the builder and view page, final tweaks to review and view pages --- templates/task_orders/builder_base.html | 2 +- .../fragments/task_order_view.html | 162 +++++++++--------- templates/task_orders/step_1.html | 1 + templates/task_orders/step_2.html | 1 + templates/task_orders/step_3.html | 1 + templates/task_orders/step_4.html | 7 +- templates/task_orders/step_5.html | 1 + templates/task_orders/view.html | 3 +- translations.yaml | 3 +- 9 files changed, 97 insertions(+), 84 deletions(-) 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_view.html b/templates/task_orders/fragments/task_order_view.html index 70d4c385..08e4b718 100644 --- a/templates/task_orders/fragments/task_order_view.html +++ b/templates/task_orders/fragments/task_order_view.html @@ -2,86 +2,90 @@ {% 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 %} -{% 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="reporting-summary-item__header-icon") }} -

-

- {{ obligated_funds | dollars }} -

-
-
-

- Total Task Order value - {{ Tooltip(("task_orders.review.tooltip.total_value" | translate), title="", classes="reporting-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 %} +
+
+
+

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

- {{ contract_amount | dollars }} + {{ obligated_funds | dollars }}

- {% else %} -

-

- {% endif %} -
-
-

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

-

- {{ expended_funds | dollars }} -

-
-
-
-
-

Documents

- -
-
-
-

CLIN summary

- - - - - - - - - - - + +
+

+ Total Task Order value + {{ Tooltip(("task_orders.review.tooltip.total_value" | translate), title="", classes="reporting-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="reporting-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

+
{{ "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 }}
+ + + + + + + + + + - - {% 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 }}
-
-
+ + {% for clin in task_order.sorted_clins %} + + {{ clin.number }} + {{ clin.type }} + {{ "{}".format(clin.jedi_clin_type) | translate}} + + {{ clin.start_date | formattedDate }} - {{ clin.end_date | formattedDate }} + + {# TODO: Swap in total CLIN amount #} + {{ clin.total_amount | dollars }} + {{ clin.obligated_amount | dollars }} + + {% endfor %} + + +
+
+{% endmacro %} 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 c76c0c73..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_view.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 index 0681dfae..e5662472 100644 --- a/templates/task_orders/view.html +++ b/templates/task_orders/view.html @@ -1,4 +1,5 @@ {% from "components/sticky_cta.html" import StickyCTA %} +{% from "task_orders/fragments/task_order_view.html" import TaskOrderView %} {% extends 'portfolios/base.html' %} @@ -11,6 +12,6 @@ {% endcall %}
- {% include "task_orders/fragments/task_order_view.html" %} + {{ TaskOrderView(task_order, portfolio) }}
{% endblock %} diff --git a/translations.yaml b/translations.yaml index d14a378b..e25078a6 100644 --- a/translations.yaml +++ b/translations.yaml @@ -531,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 From dcd0f4f6ae835c26ff78985dcdf143a20a223be5 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Thu, 2 Jan 2020 12:47:31 -0500 Subject: [PATCH 5/6] Remove unnecessary comment --- templates/task_orders/fragments/task_order_view.html | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/task_orders/fragments/task_order_view.html b/templates/task_orders/fragments/task_order_view.html index 08e4b718..0b31cfba 100644 --- a/templates/task_orders/fragments/task_order_view.html +++ b/templates/task_orders/fragments/task_order_view.html @@ -79,7 +79,6 @@ {{ clin.start_date | formattedDate }} - {{ clin.end_date | formattedDate }} - {# TODO: Swap in total CLIN amount #} {{ clin.total_amount | dollars }} {{ clin.obligated_amount | dollars }} From ee2aa4bda95d120d1df35b2cbbb0b831cdd7e57a Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Thu, 2 Jan 2020 12:57:21 -0500 Subject: [PATCH 6/6] Generalize class name to better reflect its use. --- styles/components/_portfolio_layout.scss | 25 +++++++++++++ styles/sections/_reports.scss | 25 ------------- .../portfolios/reports/portfolio_summary.html | 36 +++++++++---------- .../fragments/task_order_view.html | 32 ++++++++--------- 4 files changed, 59 insertions(+), 59 deletions(-) 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/sections/_reports.scss b/styles/sections/_reports.scss index 66cdb073..699daac6 100644 --- a/styles/sections/_reports.scss +++ b/styles/sections/_reports.scss @@ -146,28 +146,3 @@ } } } - -.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; - &--large { - font-size: 3.4rem; - font-weight: $font-bold; - } - } -} 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/fragments/task_order_view.html b/templates/task_orders/fragments/task_order_view.html index 0b31cfba..1930c248 100644 --- a/templates/task_orders/fragments/task_order_view.html +++ b/templates/task_orders/fragments/task_order_view.html @@ -9,35 +9,35 @@
-
-

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

+ 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="reporting-summary-item__header-icon") }} +
+

+ 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="reporting-summary-item__header-icon") }} +
+

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

-

+

{{ expended_funds | dollars }}