Merge pull request #392 from dod-ccpo/ccpo-submit-finver

Allow CCPO users to submit financial verification
This commit is contained in:
montana-mil 2018-10-18 09:29:10 -04:00 committed by GitHub
commit 63c26f14bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,20 +56,23 @@ class RequestsIndex(object):
} }
def _edit_link_for_request(self, viewing_role, request): def _edit_link_for_request(self, viewing_role, request):
if viewing_role == "ccpo": if request.creator == g.current_user:
return url_for("requests.approval", request_id=request.id) if request.is_pending_financial_verification:
elif request.is_pending_financial_verification:
return url_for("requests.financial_verification", request_id=request.id) return url_for("requests.financial_verification", request_id=request.id)
elif request.is_pending_financial_verification_changes: elif request.is_pending_financial_verification_changes:
return url_for( return url_for(
"requests.financial_verification", request_id=request.id, extended=True "requests.financial_verification",
request_id=request.id,
extended=True,
) )
elif request.is_pending_ccpo_action or request.is_approved: elif request.is_approved:
return url_for("requests.view_request_details", request_id=request.id) return url_for("requests.view_request_details", request_id=request.id)
else: else:
return url_for( return url_for(
"requests.requests_form_update", screen=1, request_id=request.id "requests.requests_form_update", screen=1, request_id=request.id
) )
elif viewing_role == "ccpo":
return url_for("requests.approval", request_id=request.id)
def _map_request(self, request, viewing_role): def _map_request(self, request, viewing_role):
time_created = pendulum.instance(request.time_created) time_created = pendulum.instance(request.time_created)