Add route for read-only view of request
This commit is contained in:
parent
687ae30268
commit
4d6f51ed7f
@ -119,6 +119,19 @@ def requests_submit(request_id=None):
|
|||||||
return redirect("/requests?modal=pendingCCPOApproval")
|
return redirect("/requests?modal=pendingCCPOApproval")
|
||||||
|
|
||||||
|
|
||||||
|
@requests_bp.route("/requests/pending/<string:request_id>", methods=["GET"])
|
||||||
|
def view_pending_request(request_id=None):
|
||||||
|
request = Requests.get(request_id)
|
||||||
|
return render_template(
|
||||||
|
"requests/view_pending.html",
|
||||||
|
data=request.body,
|
||||||
|
service_branches=SERVICE_BRANCHES,
|
||||||
|
assistance_org_types=ASSISTANCE_ORG_TYPES,
|
||||||
|
data_transfer_amounts=DATA_TRANSFER_AMOUNTS,
|
||||||
|
completion_date_ranges=COMPLETION_DATE_RANGES,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# TODO: generalize this, along with other authorizations, into a policy-pattern
|
# TODO: generalize this, along with other authorizations, into a policy-pattern
|
||||||
# for authorization in the application
|
# for authorization in the application
|
||||||
def _check_can_view_request(request_id):
|
def _check_can_view_request(request_id):
|
||||||
|
23
templates/requests/view_pending.html
Normal file
23
templates/requests/view_pending.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% from "components/alert.html" import Alert %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="col">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="panel__heading">
|
||||||
|
<h1>View Pending Request</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel__content">
|
||||||
|
{{ Alert('Your request is being reviewed',
|
||||||
|
message="<p>You cannot edit your submitted request while it is under review. Your request will be reviewed within 3 business days.</p>",
|
||||||
|
level='warning'
|
||||||
|
) }}
|
||||||
|
|
||||||
|
{% include "requests/_review.html" %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user