change requests index column names depending on user role
This commit is contained in:
parent
7fef858d24
commit
d921aaa2be
@ -10,6 +10,7 @@ def map_request(request):
|
||||
time_created = pendulum.instance(request.time_created)
|
||||
is_new = time_created.add(days=1) > pendulum.now()
|
||||
app_count = request.body.get("details_of_use", {}).get("num_software_systems", 0)
|
||||
annual_usage = request.body.get("details_of_use", {}).get("dollar_value", 0)
|
||||
update_url = url_for(
|
||||
"requests.requests_form_update", screen=1, request_id=request.id
|
||||
)
|
||||
@ -22,6 +23,7 @@ def map_request(request):
|
||||
"app_count": app_count,
|
||||
"date": time_created.format("M/DD/YYYY"),
|
||||
"full_name": request.creator.full_name,
|
||||
"annual_usage": annual_usage,
|
||||
"edit_link": verify_url if Requests.is_pending_financial_verification(
|
||||
request
|
||||
) else update_url,
|
||||
@ -47,4 +49,5 @@ def requests_index():
|
||||
requests=mapped_requests,
|
||||
pending_financial_verification=pending_fv,
|
||||
pending_ccpo_approval=pending_ccpo,
|
||||
extended_view=is_ccpo
|
||||
)
|
||||
|
@ -65,6 +65,7 @@
|
||||
|
||||
<div class="col col--grow">
|
||||
|
||||
{% if extended_view %}
|
||||
<form class='search-bar'>
|
||||
<div class='usa-input search-input'>
|
||||
<label for='requests-search'>Search requests by Order ID</label>
|
||||
@ -84,6 +85,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<div class='responsive-table-wrapper'>
|
||||
<table>
|
||||
@ -91,8 +93,12 @@
|
||||
<tr>
|
||||
<th scope="col">Order ID</th>
|
||||
<th scope="col">Request Date</th>
|
||||
{% if extended_view %}
|
||||
<th scope="col">Requester</th>
|
||||
<th scope="col">Total Apps</th>
|
||||
{% else %}
|
||||
<th scope="col">Annual Usage</th>
|
||||
{% endif %}
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col" class="table-cell--shrink">Actions</th>
|
||||
</tr>
|
||||
@ -106,8 +112,12 @@
|
||||
</th>
|
||||
{% endif %}
|
||||
<td>{{ r['date'] }}</td>
|
||||
{% if extended_view %}
|
||||
<td>{{ r['full_name'] }}</td>
|
||||
<td>{{ r['app_count'] }}</td>
|
||||
{% else %}
|
||||
<td>{{ r['annual_usage'] }}</td>
|
||||
{% endif %}
|
||||
<td>{{ r['status'] }}</td>
|
||||
<td class="table-cell--shrink">
|
||||
<a href="" class='icon-link'>Download</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user