Merge pull request #887 from dod-ccpo/to-review

TO Review Page
This commit is contained in:
George Drummond 2019-06-12 11:28:15 -04:00 committed by GitHub
commit e554845407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 102 additions and 41 deletions

View File

@ -28,6 +28,15 @@ class CLIN(Base, mixins.TimestampsMixin):
obligated_amount = Column(Numeric(scale=2), nullable=False) obligated_amount = Column(Numeric(scale=2), nullable=False)
jedi_clin_type = Column(SQLAEnum(JEDICLINType, native_enum=False), nullable=False) jedi_clin_type = Column(SQLAEnum(JEDICLINType, native_enum=False), nullable=False)
#
# NOTE: For now obligated CLINS are CLIN 1 + CLIN 3
#
def is_obligated(self):
return self.jedi_clin_type in [
JEDICLINType.JEDI_CLIN_1,
JEDICLINType.JEDI_CLIN_3,
]
def to_dictionary(self): def to_dictionary(self):
return { return {
c.name: getattr(self, c.name) c.name: getattr(self, c.name)

View File

@ -82,6 +82,12 @@
@include icon-link-color($color-black-light, $color-gray-lightest); @include icon-link-color($color-black-light, $color-gray-lightest);
} }
&.icon-link--download {
@include icon-link-color($color-black) .icon {
@include icon-color($color-green);
}
}
&.icon-link--disabled { &.icon-link--disabled {
opacity: 0.3; opacity: 0.3;
text-decoration: none; text-decoration: none;

View File

@ -22,7 +22,7 @@
{% endcall %} {% endcall %}
{% call StickyCTA(text="Review Funding") %} {% call StickyCTA(text="Review Funding") %}
<a href="{{ url_for("task_orders.edit", portfolio_id=portfolio.id) }}" class="usa-button usa-button-secondary" type="submit">Edit</a> <a href="{{ url_for("task_orders.edit", portfolio_id=portfolio.id, task_order_id=task_order.id) }}" class="usa-button usa-button-secondary" type="submit">Edit</a>
<a v-on:click="openModal('submit-to-1')" class="usa-button usa-button-primary" type="submit">Submit task order</a> <a v-on:click="openModal('submit-to-1')" class="usa-button usa-button-primary" type="submit">Submit task order</a>
{% endcall %} {% endcall %}
@ -34,66 +34,74 @@
<hr> <hr>
<div class="h1">Review your task order</div> <div class="h1">
<p>Check to make sure the information you entered is correct. After submission, you will confirm this task order was signed by a contracting officer. Thereafter, you will be informed as soon as CCPO completes their review.</p> {{ "task_orders.review.review_your_task_order" | translate }}
</div>
<p>
{{ "task_orders.review.check_paragraph" | translate }}
</p>
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<div class="h4">Task order number - 10 digit found in your system of record</div> <div class="h4">
{{ "task_orders.review.task_order_number" | translate }}
</div>
<div>{{task_order.number}}</div> <div>{{task_order.number}}</div>
<hr> <hr>
<div class="h3">Funding summary</div> <div class="h3">
<div>CLIN 1: Unclassified Cloud Services 001</div> {{ "task_orders.review.funding_summary" | translate }}
</div>
{% for clin in task_order.clins %}
<div>
{{ "{}".format(clin.jedi_clin_type) | translate}}
</div>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Amount</th> <th>{{ "task_orders.review.clins.amount" | translate }}</th>
<th>Obligated</th> <th>{{ "task_orders.review.clins.obligated" | translate }}</th>
<th>PoP Start</th> <th>{{ "task_orders.review.clins.pop_start" | translate }}</th>
<th>PoP End</th> <th>{{ "task_orders.review.clins.pop_end" | translate }}</th>
<th>LOA</th> <th>{{ "task_orders.review.clins.loa" | translate }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>$500,000</td> <td>{{ clin.obligated_amount | dollars }}</td>
<td>Yes</td> <td>
<td>9/07/19</td> {% if clin.is_obligated() %}
<td>9/07/20</td> {{ "common.yes" | translate }}
<td>34820394</td> {% else %}
</tr> {{ "common.no" | translate }}
</tbody> {% endif %}
</table> </td>
<td>{{ clin.start_date | formattedDate }}</td>
<div>CLIN 2: Unclassified Cloud Services 002</div> <td>{{ clin.end_date | formattedDate }}</td>
<table> <td>
<thead> {% for loa in clin.loas %}
<tr> {{ loa }}
<th>Amount</th> <br />
<th>Obligated</th> {% endfor %}
<th>PoP Start</th> </td>
<th>PoP End</th>
<th>LOA</th>
</tr>
</thead>
<tbody>
<tr>
<td>$300,000</td>
<td>No</td>
<td>9/08/20</td>
<td>9/08/21</td>
<td>q9384751934</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% endfor %}
<hr> <hr>
<div class="h3">Supporting document</div> <div class="h3">
<div class="h4">{{ Icon('ok',classes="icon-validation") }}document</div> {{ "task_orders.review.supporting_document.title" | translate }}
</div>
<div class="h4">
<a class="icon-link icon-link--download" href="{{ url_for('task_orders.download_task_order_pdf', task_order_id=task_order.id) }}">
{{ Icon('check-circle-solid') }}
{{ task_order.pdf.filename }}
</a>
</div>
</div> </div>
{{ TotalsBox(task_order=task_order) }} {{ TotalsBox(task_order=task_order) }}

18
tests/models/test_clin.py Normal file
View File

@ -0,0 +1,18 @@
from atst.models import CLIN
from atst.models.clin import JEDICLINType
from tests.factories import *
def test_is_obligated():
clin_1 = CLINFactory.create(jedi_clin_type=JEDICLINType.JEDI_CLIN_1)
assert clin_1.is_obligated()
clin_2 = CLINFactory.create(jedi_clin_type=JEDICLINType.JEDI_CLIN_2)
assert not clin_2.is_obligated()
clin_3 = CLINFactory.create(jedi_clin_type=JEDICLINType.JEDI_CLIN_3)
assert clin_3.is_obligated()
clin_4 = CLINFactory.create(jedi_clin_type=JEDICLINType.JEDI_CLIN_4)
assert not clin_4.is_obligated()

View File

@ -41,6 +41,8 @@ common:
hide: Hide hide: Hide
manage: manage manage: manage
members: Members members: Members
'yes': 'Yes'
'no': 'No'
officer_helpers: officer_helpers:
underscore_to_friendly: underscore_to_friendly:
contracting_officer: Contracting Officer contracting_officer: Contracting Officer
@ -606,6 +608,19 @@ requests:
questions_title_text: Questions related to JEDI Cloud migration questions_title_text: Questions related to JEDI Cloud migration
rationalization_software_systems_tooltip: Rationalization is the DoD process to determine whether the application should move to the cloud. rationalization_software_systems_tooltip: Rationalization is the DoD process to determine whether the application should move to the cloud.
task_orders: task_orders:
review:
review_your_task_order: Review your task order
funding_summary: Funding summary
task_order_number: Task order number - 10 digit found in your system of record
check_paragraph: Check to make sure the information you entered is correct. After submission, you will confirm this task order was signed by a contracting officer. Thereafter, you will be informed as soon as CCPO completes their review.
supporting_document:
title: Supporting document
clins:
amount: Amount
obligated: Obligated
pop_start: PoP Start
pop_end: PoP End
loa: LOA
form: form:
draft_alert_title: Your information has been saved draft_alert_title: Your information has been saved
draft_alert_message: You can return to the Task Order Builder to enter missing information. Once you are finished, youll be ready to submit this request. draft_alert_message: You can return to the Task Order Builder to enter missing information. Once you are finished, youll be ready to submit this request.
@ -731,6 +746,11 @@ task_orders:
security: '<strong>Security Officer ({security_officer})</strong> completes a Security Requirements Document. <a href="#">Send a reminder</a>' security: '<strong>Security Officer ({security_officer})</strong> completes a Security Requirements Document. <a href="#">Send a reminder</a>'
sign: '<strong>Contracting Officer ({contracting_officer})</strong> verifies funding to unlock cloud services.' sign: '<strong>Contracting Officer ({contracting_officer})</strong> verifies funding to unlock cloud services.'
whats_next: Here are the remaining steps to get your task order approved. whats_next: Here are the remaining steps to get your task order approved.
JEDICLINType:
JEDI_CLIN_1: 'CLIN 1:'
JEDI_CLIN_2: 'CLIN 2: Classified Cloud Services - 0002'
JEDI_CLIN_3: 'CLIN 3:'
JEDI_CLIN_4: 'CLIN 4:'
testing: testing:
example_string: Hello World example_string: Hello World
example_with_variables: 'Hello, {name}!' example_with_variables: 'Hello, {name}!'