From 5f9b58946576cc37b313bbb2abbaa5dc95c19ac7 Mon Sep 17 00:00:00 2001 From: dandds Date: Thu, 9 Aug 2018 14:10:17 -0400 Subject: [PATCH] only show financial verification alert on requests index page if relevant --- atst/routes/requests/index.py | 5 ++++- templates/requests.html | 36 +++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/atst/routes/requests/index.py b/atst/routes/requests/index.py index 5e9d26ca..dc1d137e 100644 --- a/atst/routes/requests/index.py +++ b/atst/routes/requests/index.py @@ -3,6 +3,7 @@ from flask import render_template, g, url_for from . import requests_bp from atst.domain.requests import Requests +from atst.models.request_status_event import RequestStatus def map_request(request): @@ -33,4 +34,6 @@ def requests_index(): mapped_requests = [map_request(r) for r in requests] - return render_template("requests.html", requests=mapped_requests) + pending_fv = any(r["status"] == RequestStatus.PENDING_FINANCIAL_VERIFICATION.value for r in mapped_requests) + + return render_template("requests.html", requests=mapped_requests, pending_financial_verification=pending_fv) diff --git a/templates/requests.html b/templates/requests.html index 879560a2..4dc0e865 100644 --- a/templates/requests.html +++ b/templates/requests.html @@ -40,22 +40,26 @@ {% else %} - {{ Alert('Pending Financial Verification', - message=" -

- The next step is to create a Task Order associated with JEDI Cloud. - Please contact a Contracting Officer (KO), Contracting Officer - Representative (COR), or a Financial Manager to help with this step. -

-

- Once the Task Order has been created, you will be asked to provide - details about the task order in the Financial Verification step. -

-

- Learn more about the JEDI Task Order and the Financial Verification process. -

- " - ) }} + {% if pending_financial_verification %} + + {{ Alert('Pending Financial Verification', + message=" +

+ The next step is to create a Task Order associated with JEDI Cloud. + Please contact a Contracting Officer (KO), Contracting Officer + Representative (COR), or a Financial Manager to help with this step. +

+

+ Once the Task Order has been created, you will be asked to provide + details about the task order in the Financial Verification step. +

+

+ Learn more about the JEDI Task Order and the Financial Verification process. +

+ " + ) }} + + {% endif %}