Merge pull request #158 from dod-ccpo/over-one-mill-159007546
Over one mill 159007546
This commit is contained in:
commit
6fa57c310a
@ -150,3 +150,7 @@ class Requests(object):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def is_pending_financial_verification(cls, request):
|
def is_pending_financial_verification(cls, request):
|
||||||
return request.status == RequestStatus.PENDING_FINANCIAL_VERIFICATION
|
return request.status == RequestStatus.PENDING_FINANCIAL_VERIFICATION
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def is_pending_ccpo_approval(cls, request):
|
||||||
|
return request.status == RequestStatus.PENDING_CCPO_APPROVAL
|
||||||
|
@ -9,8 +9,10 @@ def map_request(request):
|
|||||||
time_created = pendulum.instance(request.time_created)
|
time_created = pendulum.instance(request.time_created)
|
||||||
is_new = time_created.add(days=1) > pendulum.now()
|
is_new = time_created.add(days=1) > pendulum.now()
|
||||||
app_count = request.body.get("details_of_use", {}).get("num_software_systems", 0)
|
app_count = request.body.get("details_of_use", {}).get("num_software_systems", 0)
|
||||||
update_url = url_for('requests.requests_form_update', screen=1, request_id=request.id)
|
update_url = url_for(
|
||||||
verify_url = url_for('requests.financial_verification', request_id=request.id)
|
"requests.requests_form_update", screen=1, request_id=request.id
|
||||||
|
)
|
||||||
|
verify_url = url_for("requests.financial_verification", request_id=request.id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"order_id": request.id,
|
"order_id": request.id,
|
||||||
@ -19,7 +21,9 @@ def map_request(request):
|
|||||||
"app_count": app_count,
|
"app_count": app_count,
|
||||||
"date": time_created.format("M/DD/YYYY"),
|
"date": time_created.format("M/DD/YYYY"),
|
||||||
"full_name": request.creator.full_name,
|
"full_name": request.creator.full_name,
|
||||||
"edit_link": verify_url if Requests.is_pending_financial_verification(request) else update_url
|
"edit_link": verify_url if Requests.is_pending_financial_verification(
|
||||||
|
request
|
||||||
|
) else update_url,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -34,5 +38,11 @@ def requests_index():
|
|||||||
mapped_requests = [map_request(r) for r in requests]
|
mapped_requests = [map_request(r) for r in requests]
|
||||||
|
|
||||||
pending_fv = any(Requests.is_pending_financial_verification(r) for r in requests)
|
pending_fv = any(Requests.is_pending_financial_verification(r) for r in requests)
|
||||||
|
pending_ccpo = any(Requests.is_pending_ccpo_approval(r) for r in requests)
|
||||||
|
|
||||||
return render_template("requests.html", requests=mapped_requests, pending_financial_verification=pending_fv)
|
return render_template(
|
||||||
|
"requests.html",
|
||||||
|
requests=mapped_requests,
|
||||||
|
pending_financial_verification=pending_fv,
|
||||||
|
pending_ccpo_approval=pending_ccpo,
|
||||||
|
)
|
||||||
|
@ -105,7 +105,7 @@ def requests_submit(request_id=None):
|
|||||||
return redirect("/requests?modal=pendingFinancialVerification")
|
return redirect("/requests?modal=pendingFinancialVerification")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return redirect("/requests")
|
return redirect("/requests?modal=pendingCCPOApproval")
|
||||||
|
|
||||||
|
|
||||||
# TODO: generalize this, along with other authorizations, into a policy-pattern
|
# TODO: generalize this, along with other authorizations, into a policy-pattern
|
||||||
|
@ -21,6 +21,7 @@ const app = new Vue({
|
|||||||
modals: {
|
modals: {
|
||||||
styleguideModal: false,
|
styleguideModal: false,
|
||||||
pendingFinancialVerification: false,
|
pendingFinancialVerification: false,
|
||||||
|
pendingCCPOApproval: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
11
templates/fragments/pending_ccpo_approval_alert.html
Normal file
11
templates/fragments/pending_ccpo_approval_alert.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<p>
|
||||||
|
We will review and respond to your request in 72 hours. You’ll be notified via email or phone.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
While your request is being reviewed, your next step is to create a Task Order associated with JEDI Cloud. Please contact a Contracting Officer (KO), Contracting Officer Representative (COR), or a Financial Manager to help with this step.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Learn more about the JEDI Task Order and the Financial Verification process.
|
||||||
|
</p>
|
35
templates/fragments/pending_ccpo_approval_modal.html
Normal file
35
templates/fragments/pending_ccpo_approval_modal.html
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<h1>
|
||||||
|
Request submitted. Approval pending.
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We will review and respond to your request in 72 hours. You’ll be notified via email or phone.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Your request is being reviewed because:
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
Your request includes over $1 million for cloud resources
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
We may need more information about your request
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
Next Steps
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
While your request is being reviewed, your next step is to create a Task Order associated with JEDI Cloud. Please contact a Contracting Officer (KO), Contracting Officer Representative (COR), or a Financial Manager to help with this step.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Once the Task Order has been created, you will be asked to provide details about the task order in the Financial Verification step.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Learn more about the JEDI Task Order and the Financial Verification process.
|
||||||
|
</p>
|
@ -16,6 +16,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
|
{% call Modal(name='pendingCCPOApproval', dismissable=True) %}
|
||||||
|
|
||||||
|
{% include 'fragments/pending_ccpo_approval_modal.html' %}
|
||||||
|
|
||||||
|
<div class='action-group'>
|
||||||
|
<a v-on:click="closeModal('pendingCCPOApproval')" class='action-group__action usa-button'>Close</a>
|
||||||
|
</div>
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
{% if not requests %}
|
{% if not requests %}
|
||||||
|
|
||||||
{{ EmptyState(
|
{{ EmptyState(
|
||||||
@ -33,6 +42,12 @@
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if pending_ccpo_approval %}
|
||||||
|
|
||||||
|
{{ Alert('Request submitted. Approval pending.', fragment="fragments/pending_ccpo_approval_alert.html") }}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="col col--grow">
|
<div class="col col--grow">
|
||||||
|
|
||||||
<form class='search-bar'>
|
<form class='search-bar'>
|
||||||
|
@ -21,7 +21,7 @@ def test_submit_reviewed_request(monkeypatch, client, user_session):
|
|||||||
follow_redirects=False,
|
follow_redirects=False,
|
||||||
)
|
)
|
||||||
assert "/requests" in response.headers["Location"]
|
assert "/requests" in response.headers["Location"]
|
||||||
assert "modal" not in response.headers["Location"]
|
assert "modal=pendingCCPOApproval" in response.headers["Location"]
|
||||||
|
|
||||||
|
|
||||||
def test_submit_autoapproved_reviewed_request(monkeypatch, client, user_session):
|
def test_submit_autoapproved_reviewed_request(monkeypatch, client, user_session):
|
||||||
@ -35,4 +35,4 @@ def test_submit_autoapproved_reviewed_request(monkeypatch, client, user_session)
|
|||||||
data="",
|
data="",
|
||||||
follow_redirects=False,
|
follow_redirects=False,
|
||||||
)
|
)
|
||||||
assert "/requests?modal=" in response.headers["Location"]
|
assert "/requests?modal=pendingFinancialVerification" in response.headers["Location"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user