fix "pending CCPO approval" alert display logic
This commit is contained in:
parent
37bb0c5d30
commit
1387423a1c
@ -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
|
||||||
|
@ -37,11 +37,8 @@ def requests_index():
|
|||||||
|
|
||||||
mapped_requests = [map_request(r) for r in requests]
|
mapped_requests = [map_request(r) for r in requests]
|
||||||
|
|
||||||
pending_fv_count = [
|
pending_fv = any(Requests.is_pending_financial_verification(r) for r in requests)
|
||||||
True for r in requests if Requests.is_pending_financial_verification(r)
|
pending_ccpo = any(Requests.is_pending_ccpo_approval(r) for r in requests)
|
||||||
]
|
|
||||||
pending_fv = len(pending_fv_count) > 1
|
|
||||||
pending_ccpo = len(pending_fv_count) != len(mapped_requests)
|
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"requests.html",
|
"requests.html",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user