Pass in request as jedi_request
in request detail template
Fixes the user sessions/daily traffic fields not being shown when they should be.
This commit is contained in:
parent
9f4663a8d5
commit
a859af9eea
@ -35,7 +35,7 @@ def render_approval(request, form=None, internal_comment_form=None):
|
||||
"requests/approval.html",
|
||||
data=data,
|
||||
reviews=list(reversed(request.reviews)),
|
||||
request=request,
|
||||
jedi_request=request,
|
||||
current_status=request.status.value,
|
||||
review_form=form or CCPOReviewForm(),
|
||||
internal_comment_form=internal_comment_form,
|
||||
|
@ -141,6 +141,6 @@ def view_request_details(request_id=None):
|
||||
return render_template(
|
||||
"requests/details.html",
|
||||
data=data,
|
||||
request=request,
|
||||
jedi_request=request,
|
||||
requires_fv_action=requires_fv_action,
|
||||
)
|
||||
|
@ -134,7 +134,7 @@
|
||||
{{ DefinitionReviewField("DoD ID", "primary_poc", "dodid_poc") }}
|
||||
</dl>
|
||||
|
||||
{% if request.has_financial_data %}
|
||||
{% if jedi_request.has_financial_data %}
|
||||
<hr>
|
||||
<h2>
|
||||
Financial Verification
|
||||
|
@ -17,14 +17,14 @@
|
||||
|
||||
<section class='panel'>
|
||||
<header class='panel__heading panel__heading--divider request-approval__heading'>
|
||||
<h1 class='h2'>Request: {{ request.displayname }}
|
||||
<h1 class='h2'>Request: {{ jedi_request.displayname }}
|
||||
</h1>
|
||||
<span class='label label--info'>{{ current_status }}</span>
|
||||
</header>
|
||||
|
||||
<div class='panel__content'>
|
||||
|
||||
{% with data=data, request_id=request.id %}
|
||||
{% with data=data, request_id=jedi_request.id %}
|
||||
{% include "requests/_review.html" %}
|
||||
{% endwith %}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
</section>
|
||||
|
||||
<section class='internal-notes' id='ccpo-notes'>
|
||||
<form method="POST" action="{{ url_for('requests.create_internal_comment', request_id=request.id) }}">
|
||||
<form method="POST" action="{{ url_for('requests.create_internal_comment', request_id=jedi_request.id) }}">
|
||||
<div class='panel'>
|
||||
<div class='panel__heading panel__heading--divider'>
|
||||
<h2>CCPO Internal Comments</h2>
|
||||
@ -82,7 +82,7 @@
|
||||
|
||||
|
||||
<section class='request-approval__review'>
|
||||
<form method="POST" action="{{ url_for("requests.submit_approval", request_id=request.id) }}" autocomplete="off">
|
||||
<form method="POST" action="{{ url_for("requests.submit_approval", request_id=jedi_request.id) }}" autocomplete="off">
|
||||
{{ review_form.csrf_token }}
|
||||
|
||||
<ccpo-approval inline-template>
|
||||
@ -139,7 +139,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if request.is_pending_ccpo_action %}
|
||||
{% if jedi_request.is_pending_ccpo_action %}
|
||||
<div class='panel__heading request-approval__review__heading'>
|
||||
<h3 class='h3'>Review this Request</h2>
|
||||
</div>
|
||||
@ -226,7 +226,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
{% if request.is_pending_ccpo_action %}
|
||||
{% if jedi_request.is_pending_ccpo_action %}
|
||||
<div v-if='approving || denying' class='action-group' v-cloak>
|
||||
<button v-if='approving' type="submit" name="approved" class='usa-button usa-button-big'>Approve Request</button>
|
||||
<button v-if='denying' type="submit" name="denied" class='usa-button usa-button-big'>Request Revisions</button>
|
||||
|
@ -5,9 +5,9 @@
|
||||
{% block content %}
|
||||
<div class="col">
|
||||
|
||||
{% if request.is_pending_ccpo_acceptance %}
|
||||
{% if jedi_request.is_pending_ccpo_acceptance %}
|
||||
{{ Alert('Request submitted. Approval pending.', fragment="fragments/pending_ccpo_acceptance_alert.html") }}
|
||||
{% elif request.is_pending_ccpo_approval %}
|
||||
{% elif jedi_request.is_pending_ccpo_approval %}
|
||||
{{ Alert('Request submitted. Approval pending.', fragment="fragments/pending_ccpo_approval_modal.html") }}
|
||||
{% elif requires_fv_action %}
|
||||
{% include 'requests/review_menu.html' %}
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="panel">
|
||||
<div class="panel__heading">
|
||||
<h1>Request Details</h1>
|
||||
<h2><span class="subtitle">{{ request.displayname }}</span> <span class="label label--info">{{ request.status_displayname }}</span></h2>
|
||||
<h2><span class="subtitle">{{ jedi_request.displayname }}</span> <span class="label label--info">{{ jedi_request.status_displayname }}</span></h2>
|
||||
</div>
|
||||
|
||||
<div class="panel__content">
|
||||
|
@ -19,7 +19,7 @@ def test_can_show_financial_data(client, user_session):
|
||||
)
|
||||
|
||||
body = response.data.decode()
|
||||
assert re.search(">\s+Financial Verification\s+<", body)
|
||||
assert re.search(r">\s+Financial Verification\s+<", body)
|
||||
|
||||
|
||||
def test_can_not_show_financial_data(client, user_session):
|
||||
@ -34,4 +34,4 @@ def test_can_not_show_financial_data(client, user_session):
|
||||
)
|
||||
|
||||
body = response.data.decode()
|
||||
assert not re.search(">\s+Financial Verification\s+<", body)
|
||||
assert not re.search(r">\s+Financial Verification\s+<", body)
|
||||
|
Loading…
x
Reference in New Issue
Block a user