From d921aaa2be9976a78aac237943d50dc67a434e8d Mon Sep 17 00:00:00 2001 From: dandds Date: Mon, 13 Aug 2018 15:27:07 -0400 Subject: [PATCH 1/3] change requests index column names depending on user role --- atst/routes/requests/index.py | 3 ++ templates/requests.html | 54 +++++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/atst/routes/requests/index.py b/atst/routes/requests/index.py index d24e2a2c..7130c722 100644 --- a/atst/routes/requests/index.py +++ b/atst/routes/requests/index.py @@ -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 ) diff --git a/templates/requests.html b/templates/requests.html index 566da288..7e0638c5 100644 --- a/templates/requests.html +++ b/templates/requests.html @@ -65,25 +65,27 @@
- +
+ + +
+ + {% endif %}
@@ -91,8 +93,12 @@ - - + {% if extended_view %} + + + {% else %} + + {% endif %} @@ -106,8 +112,12 @@ {% endif %} - - + {% if extended_view %} + + + {% else %} + + {% endif %}
Order ID Request DateRequesterTotal AppsRequesterTotal AppsAnnual UsageStatus Actions
{{ r['date'] }}{{ r['full_name'] }}{{ r['app_count'] }}{{ r['full_name'] }}{{ r['app_count'] }}{{ r['annual_usage'] }}{{ r['status'] }} Download From bd1a3c09c4497347748215c404b2611ec4b6ac64 Mon Sep 17 00:00:00 2001 From: dandds Date: Tue, 14 Aug 2018 09:13:27 -0400 Subject: [PATCH 2/3] update requests index column names --- templates/requests.html | 45 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/templates/requests.html b/templates/requests.html index 7e0638c5..e2d55138 100644 --- a/templates/requests.html +++ b/templates/requests.html @@ -48,20 +48,22 @@ {% endif %} -
-
-
3
-
Pending Requests
+ {% if extended_view %} +
+
+
3
+
Pending Requests
+
+
+
2,456
+
Completed Requests This Year
+
+
+
234
+
Denied Requests
+
-
-
2,456
-
Completed Requests This Year
-
-
-
234
-
Denied Requests
-
-
+ {% endif %}
@@ -91,15 +93,14 @@ - - + + {% if extended_view %} - - {% else %} - + {% endif %} - + + @@ -114,13 +115,11 @@ {% if extended_view %} - - {% else %} - + {% endif %} + From 130b86812833736bfe28fa10aa1683b44e3230f4 Mon Sep 17 00:00:00 2001 From: dandds Date: Tue, 14 Aug 2018 12:40:20 -0400 Subject: [PATCH 3/3] remove action column in requests index view for now --- templates/requests.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/templates/requests.html b/templates/requests.html index e2d55138..42d6ac1b 100644 --- a/templates/requests.html +++ b/templates/requests.html @@ -101,7 +101,6 @@ {% endif %} - @@ -119,9 +118,6 @@ {% endif %} - {% endfor %}
Order IDRequest DateJEDI Cloud Request IDDate Request Initiated / CreatedRequesterTotal AppsAnnual UsageReason FlaggedStatusProjected Annual Usage ($)Request Status Actions
{{ r['date'] }}{{ r['full_name'] }}{{ r['app_count'] }}{{ r['annual_usage'] }}${{ r['annual_usage'] }} {{ r['status'] }} - Download Approval
Projected Annual Usage ($) Request StatusActions
${{ r['annual_usage'] }} {{ r['status'] }} - Approval -