ccpo should see request approval screen for all request

This commit is contained in:
dandds
2018-09-04 17:28:16 -04:00
parent a96af2d095
commit 038cceb34b
4 changed files with 29 additions and 43 deletions

View File

@@ -1,9 +1,11 @@
from flask import render_template
from flask import render_template, g
from . import requests_bp
from atst.forms.data import SERVICE_BRANCHES
from atst.domain.requests import Requests
@requests_bp.route("/request_approval", methods=["GET"])
def requests_approval():
return render_template("request_approval.html", service_branches=SERVICE_BRANCHES)
@requests_bp.route("/requests/approval/<string:request_id>", methods=["GET"])
def approval(request_id):
request = Requests.get(g.current_user, request_id)
return render_template("requests/approval.html", data=request.body, service_branches=SERVICE_BRANCHES)

View File

@@ -70,7 +70,9 @@ class RequestsIndex(object):
else "-"
)
if Requests.is_pending_financial_verification(request):
if viewing_role == "ccpo":
edit_link = url_for("requests.approval", request_id=request.id)
elif Requests.is_pending_financial_verification(request):
edit_link = url_for(
"requests.financial_verification", request_id=request.id
)