display review comment for financial verification that needs changes
This commit is contained in:
parent
7f9c7dcaec
commit
8359a2a079
@ -39,6 +39,7 @@ def financial_verification(request_id=None):
|
||||
"requests/financial_verification.html",
|
||||
f=form,
|
||||
request=request,
|
||||
review_comment=request.review_comment,
|
||||
extended=is_extended(request),
|
||||
)
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% from "components/alert.html" import Alert %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col">
|
||||
@ -9,9 +7,7 @@
|
||||
{% include 'requests/menu.html' %}
|
||||
|
||||
{% if review_comment %}
|
||||
{{ Alert('Changes Requested',
|
||||
message="<p>CCPO has requested changes to your submission with the following notes:<br>" + review_comment + "<br>Please contact info@jedi.cloud or 123-123-4567 for further discussion.</p>",
|
||||
level='warning') }}
|
||||
{% include 'requests/comment.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% block form_action %}
|
||||
|
5
templates/requests/comment.html
Normal file
5
templates/requests/comment.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% from "components/alert.html" import Alert %}
|
||||
|
||||
{{ Alert('Changes Requested',
|
||||
message="<p>CCPO has requested changes to your submission with the following notes:<br>" + review_comment + "<br>Please contact info@jedi.cloud or 123-123-4567 for further discussion.</p>",
|
||||
level='warning') }}
|
@ -12,6 +12,10 @@
|
||||
{{ Alert('Pending Financial Verification', fragment="fragments/pending_financial_verification.html") }}
|
||||
{% endif %}
|
||||
|
||||
{% if review_comment %}
|
||||
{% include 'requests/comment.html' %}
|
||||
{% endif %}
|
||||
|
||||
<financial inline-template v-bind:initial-data='{{ f.data|mixedContentToJson }}'>
|
||||
<div class="col">
|
||||
|
||||
|
@ -3,9 +3,16 @@ import pytest
|
||||
from flask import url_for
|
||||
|
||||
from atst.eda_client import MockEDAClient
|
||||
from atst.models.request_status_event import RequestStatus
|
||||
|
||||
from tests.mocks import MOCK_REQUEST, MOCK_USER
|
||||
from tests.factories import PENumberFactory, RequestFactory, UserFactory
|
||||
from tests.factories import (
|
||||
PENumberFactory,
|
||||
RequestFactory,
|
||||
UserFactory,
|
||||
RequestStatusEventFactory,
|
||||
RequestReviewFactory,
|
||||
)
|
||||
|
||||
|
||||
class TestPENumberInForm:
|
||||
@ -148,3 +155,21 @@ class TestPENumberInForm:
|
||||
response = self.submit_data(client, user, data, extended=True)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_displays_ccpo_review_comment(user_session, client):
|
||||
creator = UserFactory.create()
|
||||
ccpo = UserFactory.from_atat_role("ccpo")
|
||||
user_session(creator)
|
||||
request = RequestFactory.create(creator=creator)
|
||||
review_comment = "add all of the correct info, instead of the incorrect info"
|
||||
request.status_events = [
|
||||
RequestStatusEventFactory.create(
|
||||
revision=request.latest_revision,
|
||||
new_status=RequestStatus.CHANGES_REQUESTED_TO_FINVER,
|
||||
review=RequestReviewFactory.create(reviewer=ccpo, comment=review_comment),
|
||||
)
|
||||
]
|
||||
response = client.get("/requests/verify/{}".format(request.id))
|
||||
body = response.data.decode()
|
||||
assert review_comment in body
|
||||
|
Loading…
x
Reference in New Issue
Block a user