touch up review page and add route for submitting task order invites

This commit is contained in:
dandds 2018-12-20 14:30:15 -05:00
parent c516f0f74c
commit c024d12e3b
4 changed files with 133 additions and 96 deletions

View File

@ -4,3 +4,4 @@ task_orders_bp = Blueprint("task_orders", __name__)
from . import new
from . import index
from . import invite

View File

@ -0,0 +1,15 @@
from flask import redirect, url_for
from . import task_orders_bp
from atst.domain.task_orders import TaskOrders
from atst.utils.flash import formatted_flash as flash
# TODO: add a real implementation for this
@task_orders_bp.route("/task_orders/invite/<task_order_id>", methods=["POST"])
def invite(task_order_id):
task_order = TaskOrders.get(task_order_id)
flash("task_order_complete", task_order=task_order)
return redirect(
url_for("workspaces.workspace_members", workspace_id=task_order.workspace.id)
)

View File

@ -101,6 +101,13 @@ MESSAGES = {
"message_template": "",
"category": "success",
},
"task_order_complete": {
"title_template": "Task Order Complete",
"message_template": """
Invitations for {{ task_order.portfolio_name }} have been sent.
""",
"category": "success",
},
}

View File

@ -18,66 +18,69 @@
{% set edit_link = EditLink(url_for("task_orders.new", screen=1)) %}
{% endif %}
<h3>Scope (Statement of Work) {{ edit_link }}</h3>
<p>
{{ task_order.scope or RequiredLabel() }}
</p>
<div class="row">
<div class="col col--grow">
<h3>Period of Performance length {{ edit_link }}</h3>
<section>
<h3>Scope (Statement of Work) {{ edit_link }}</h3>
<p>
{{ task_order.scope or RequiredLabel() }}
</p>
<div class="row">
<div class="col col--grow">
<h3>Period of Performance length {{ edit_link }}</h3>
{{ task_order.period or RequiredLabel() }}
</div>
<div class="col col--grow">
<h3>Total funding requested {{ edit_link }}</h3>
<p>
{{ task_order.budget }}
</p>
</div>
</div>
</div>
</section>
<hr>
<h2>Generated Documents</h2>
<section>
<h2>Generated Documents</h2>
<p>
<ul class="usa-unstyled-list">
<li>
<a href="#" download>
{{ Icon('download') }}
Cover Sheet
</a>
</p>
</li>
<p>
<li>
<a href="#" download>
{{ Icon('download') }}
Market Research
</a>
</p>
</li>
{% if task_order %}
<p>
{% if task_order %}
<li>
<a href="{{ url_for('task_orders.download_summary', task_order_id=task_order.id) }}" download>
{{ Icon('download') }}
Task Order Draft
</a>
</p>
{% endif %}
</li>
{% endif %}
<p>
<li>
<a href="#" download>
{{ Icon('download') }}
DD 254
</a>
</p>
</li>
</ul>
</section>
<hr>
<h2>Invite Signatories/Collaborators</h2>
<section>
<h2>Invite Signatories/Collaborators</h2>
<div class="form-row">
<div class="form-row">
<div class="form-col">
<div class="usa-input">
<fieldset class="usa-input__choices">
@ -110,8 +113,8 @@
</fieldset>
</div>
</div>
</div>
<div class="form-row">
</div>
<div class="form-row">
<div class="form-col">
<div class="usa-input">
<fieldset class="usa-input__choices">
@ -132,6 +135,17 @@
<div class="usa-input">
</div>
</div>
</div>
</div>
</section>
{% endblock %}
{% block next %}
<div class='action-group'>
<input type='submit' class='usa-button usa-button-primary' value='Send Invitations' />
</div>
{% endblock %}
{% block form_action %}
<form method='POST' action="{{ url_for('task_orders.invite', task_order_id=task_order_id) }}" autocomplete="off">
{% endblock %}