Fix link to financial verification page
This commit is contained in:
parent
1338e36b1c
commit
115c84680c
@ -146,3 +146,7 @@ class Requests(object):
|
|||||||
return request.status == "incomplete" and all(
|
return request.status == "incomplete" and all(
|
||||||
section in existing_request_sections for section in all_request_sections
|
section in existing_request_sections for section in all_request_sections
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def is_pending_financial_verification(cls, request):
|
||||||
|
return request.status == RequestStatus.PENDING_FINANCIAL_VERIFICATION
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import pendulum
|
import pendulum
|
||||||
from flask import render_template, g
|
from flask import render_template, g, url_for
|
||||||
|
|
||||||
from . import requests_bp
|
from . import requests_bp
|
||||||
from atst.domain.requests import Requests
|
from atst.domain.requests import Requests
|
||||||
@ -9,6 +9,8 @@ def map_request(request):
|
|||||||
time_created = pendulum.instance(request.time_created)
|
time_created = pendulum.instance(request.time_created)
|
||||||
is_new = time_created.add(days=1) > pendulum.now()
|
is_new = time_created.add(days=1) > pendulum.now()
|
||||||
app_count = request.body.get("details_of_use", {}).get("num_software_systems", 0)
|
app_count = request.body.get("details_of_use", {}).get("num_software_systems", 0)
|
||||||
|
update_url = url_for('requests.requests_form_update', screen=1, request_id=request.id)
|
||||||
|
verify_url = url_for('requests.financial_verification', request_id=request.id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"order_id": request.id,
|
"order_id": request.id,
|
||||||
@ -17,6 +19,7 @@ def map_request(request):
|
|||||||
"app_count": app_count,
|
"app_count": app_count,
|
||||||
"date": time_created.format("M/DD/YYYY"),
|
"date": time_created.format("M/DD/YYYY"),
|
||||||
"full_name": request.creator.full_name,
|
"full_name": request.creator.full_name,
|
||||||
|
"edit_link": verify_url if Requests.is_pending_financial_verification(request) else update_url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
{% for r in requests %}
|
{% for r in requests %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<a class='icon-link icon-link--large' href="{{ url_for('requests.requests_form_update', screen=1, request_id=r['order_id']) if r["status"] != "approved" else url_for('requests.financial_verification', request_id=r['order_id']) }}">{{ r['order_id'] }}</a>
|
<a class='icon-link icon-link--large' href="{{ r['edit_link'] }}">{{ r['order_id'] }}</a>
|
||||||
{% if r['is_new'] %}<span class="usa-label">New</span>
|
{% if r['is_new'] %}<span class="usa-label">New</span>
|
||||||
</th>
|
</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user