Merge pull request #317 from dod-ccpo/approval-layout
Revised approval layout
This commit is contained in:
@@ -124,7 +124,7 @@ CUMULATIVE_BUDGET_AARDVARK = {
|
||||
"06/2018": {"spend": 41725, "cumulative": 116984},
|
||||
"07/2018": {"spend": 41328, "cumulative": 158312},
|
||||
"08/2018": {"spend": 47491, "cumulative": 205803},
|
||||
"09/2018": {"spend": 45826, "cumulative": 251629},
|
||||
"09/2018": {"spend": 36028, "cumulative": 241831},
|
||||
}
|
||||
|
||||
MONTHLY_SPEND_BELUGA = {
|
||||
|
@@ -7,6 +7,6 @@ from .forms import ValidatedForm
|
||||
class InternalCommentForm(ValidatedForm):
|
||||
text = TextAreaField(
|
||||
"CCPO Internal Notes",
|
||||
description="You may add additional comments and notes for internal CCPO reference and follow-up here.",
|
||||
description="Add comments or notes for internal CCPO reference and follow-up here.<strong>These comments <em>will not</em> be visible to the person making the JEDI request.</strong>",
|
||||
validators=[Optional()],
|
||||
)
|
||||
|
@@ -12,6 +12,9 @@ from . import requests_bp
|
||||
from atst.domain.requests import Requests
|
||||
from atst.domain.exceptions import NotFoundError
|
||||
from atst.forms.ccpo_review import CCPOReviewForm
|
||||
from atst.forms.internal_comment import InternalCommentForm
|
||||
|
||||
from datetime import date
|
||||
|
||||
|
||||
def map_ccpo_authorizing(user):
|
||||
@@ -27,6 +30,22 @@ def render_approval(request, form=None):
|
||||
mo_data = map_ccpo_authorizing(g.current_user)
|
||||
form = CCPOReviewForm(data=mo_data)
|
||||
|
||||
internal_comment_form = InternalCommentForm(text=request.internal_comments_text)
|
||||
|
||||
# Dummy internal comments
|
||||
comments = [
|
||||
{
|
||||
"time_created": date(2018, 9, 18),
|
||||
"full_name_commenter": "Darth Vader",
|
||||
"message": "We'll have no more of this Obi-Wan Kenobi jibberish...and don't talk to me about your mission, either. You're fortunate he doesn't blast you into a million pieces right here. ",
|
||||
},
|
||||
{
|
||||
"time_created": date(2018, 9, 20),
|
||||
"full_name_commenter": "Grand Moff Tarkin",
|
||||
"message": "We'll have no more of this Obi-Wan Kenobi jibberish...and don't talk to me about your mission, either. You're fortunate he doesn't blast you into a million pieces right here. ",
|
||||
},
|
||||
]
|
||||
|
||||
return render_template(
|
||||
"requests/approval.html",
|
||||
data=data,
|
||||
@@ -34,6 +53,8 @@ def render_approval(request, form=None):
|
||||
request=request,
|
||||
current_status=request.status.value,
|
||||
f=form or CCPOReviewForm(),
|
||||
internal_comment_form=internal_comment_form,
|
||||
comments=comments,
|
||||
)
|
||||
|
||||
|
||||
@@ -76,3 +97,14 @@ def task_order_pdf_download(request_id):
|
||||
|
||||
else:
|
||||
raise NotFoundError("task_order pdf")
|
||||
|
||||
|
||||
@requests_bp.route("/requests/internal_comments/<string:request_id>", methods=["POST"])
|
||||
def create_internal_comment(request_id):
|
||||
# form = InternalCommentForm(http_request.form)
|
||||
# if form.validate():
|
||||
# request = Requests.get(g.current_user, request_id)
|
||||
# Requests.update_internal_comments(g.current_user, request, form.data["text"])
|
||||
return redirect(
|
||||
url_for("requests.approval", request_id=request_id, _anchor="ccpo-notes")
|
||||
)
|
||||
|
Reference in New Issue
Block a user