diff --git a/atst/app.py b/atst/app.py index 2c2b0cba..06f3c475 100644 --- a/atst/app.py +++ b/atst/app.py @@ -68,7 +68,7 @@ def make_flask_callbacks(app): ) g.dev = os.getenv("FLASK_ENV", "dev") == "dev" g.matchesPath = lambda href: re.match("^" + href, request.path) - g.modalOpen = request.args.get("modal", False) + g.modal = request.args.get("modal", None) g.current_user = { "id": "cce17030-4109-4719-b958-ed109dbb87c8", "first_name": "Amanda", diff --git a/atst/routes/requests/index.py b/atst/routes/requests/index.py index 5e9d26ca..f756836f 100644 --- a/atst/routes/requests/index.py +++ b/atst/routes/requests/index.py @@ -33,4 +33,6 @@ def requests_index(): mapped_requests = [map_request(r) for r in requests] - return render_template("requests.html", requests=mapped_requests) + pending_fv = any(Requests.is_pending_financial_verification(r) for r in requests) + + return render_template("requests.html", requests=mapped_requests, pending_financial_verification=pending_fv) diff --git a/atst/routes/requests/requests_form.py b/atst/routes/requests/requests_form.py index 50a47217..ca474d61 100644 --- a/atst/routes/requests/requests_form.py +++ b/atst/routes/requests/requests_form.py @@ -4,6 +4,7 @@ from . import requests_bp from atst.domain.requests import Requests from atst.routes.requests.jedi_request_flow import JEDIRequestFlow from atst.models.permissions import Permissions +from atst.models.request_status_event import RequestStatus from atst.domain.exceptions import UnauthorizedError @@ -99,8 +100,8 @@ def requests_submit(request_id=None): request = Requests.get(request_id) Requests.submit(request) - if request.status == "approved": - return redirect("/requests?modal=True") + if request.status == RequestStatus.PENDING_FINANCIAL_VERIFICATION: + return redirect("/requests?modal=pendingFinancialVerification") else: return redirect("/requests") diff --git a/js/index.js b/js/index.js index 59883c65..07da8d42 100644 --- a/js/index.js +++ b/js/index.js @@ -20,7 +20,15 @@ const app = new Vue({ return { modals: { styleguideModal: false, + pendingFinancialVerification: false, } } + }, + mounted: function() { + const modalOpen = document.querySelector("#modalOpen"); + if (modalOpen) { + const modal = modalOpen.getAttribute("data-modal"); + this.modals[modal] = true; + } } }) diff --git a/templates/base.html b/templates/base.html index 8416032f..a29a6c04 100644 --- a/templates/base.html +++ b/templates/base.html @@ -35,6 +35,11 @@ {% include 'footer.html' %} {% block modal %}{% endblock %} + + {% if g.modal %} +
+ 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. +
diff --git a/templates/requests.html b/templates/requests.html index 25520ac2..df6999ca 100644 --- a/templates/requests.html +++ b/templates/requests.html @@ -4,37 +4,18 @@ {% from "components/modal.html" import Modal %} {% from "components/empty_state.html" import EmptyState %} -{% block modal %} - {% if g.modalOpen %} - {% call Modal() %} -- Your next step is to create a Task Order (T.O.) associated with - JEDI Cloud. Please consult a Contracting Officer (KO) or - Contracting Officer Representative (COR) to help with this step. -
- -- Once the Task Order (T.O.) has been created, we will need the following - details to create your account. These details will help keep your cloud - usage in sync with your budget. -
- - {{ Alert("You'll need these details: ", - message="Task Order Number
Contracting Officer: Name, E-mail and Office
" - ) }} - - -Your next step is to create a Task Order (T.O.) associated with JEDI Cloud. Please consult a Contracting Officer (KO) or Contracting Officer Representative (COR) to help with this step.
" - ) }} + {% if pending_financial_verification %} + + {{ Alert('Pending Financial Verification', fragment="fragments/pending_financial_verification.html") }} + + {% endif %}