Use new edit route
This commit is contained in:
parent
ce6b526da1
commit
136b97b23f
@ -15,7 +15,7 @@ def review_task_order(task_order_id):
|
|||||||
task_order = TaskOrders.get(task_order_id)
|
task_order = TaskOrders.get(task_order_id)
|
||||||
if task_order.is_draft:
|
if task_order.is_draft:
|
||||||
return redirect(
|
return redirect(
|
||||||
url_for("task_orders.form_step_one_add_pdf", task_order_id=task_order.id)
|
url_for("task_orders.edit", task_order_id=task_order.id)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
signature_form = SignatureForm()
|
signature_form = SignatureForm()
|
||||||
|
@ -60,7 +60,7 @@ def update_task_order(
|
|||||||
def edit(task_order_id):
|
def edit(task_order_id):
|
||||||
task_order = TaskOrders.get(task_order_id)
|
task_order = TaskOrders.get(task_order_id)
|
||||||
|
|
||||||
if task_order.number is None:
|
if not task_order.number:
|
||||||
return redirect(
|
return redirect(
|
||||||
url_for("task_orders.form_step_two_add_number", task_order_id=task_order_id)
|
url_for("task_orders.form_step_two_add_number", task_order_id=task_order_id)
|
||||||
)
|
)
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro TaskOrderEditButton(task_order, text="Edit", secondary=False) %}
|
{% macro TaskOrderEditButton(task_order, text="Edit", secondary=False) %}
|
||||||
<a href="{{ url_for('task_orders.form_step_one_add_pdf', task_order_id=task_order.id) }}" class="usa-button {{ 'usa-button-secondary' if secondary else '' }}">
|
<a href="{{ url_for('task_orders.edit', task_order_id=task_order.id) }}" class="usa-button {{ 'usa-button-secondary' if secondary else '' }}">
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</a>
|
</a>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{% block portfolio_content %}
|
{% block portfolio_content %}
|
||||||
|
|
||||||
{% call StickyCTA(text="Task order details") %}
|
{% call StickyCTA(text="Task order details") %}
|
||||||
<a href="{{ url_for('task_orders.form_step_one_add_pdf', task_order_id=task_order.id) }}" class="usa-button usa-button-secondary" type="submit">Edit</a>
|
<a href="{{ url_for('task_orders.edit', task_order_id=task_order.id) }}" class="usa-button usa-button-secondary" type="submit">Edit</a>
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
{% include "fragments/task_order_review.html" %}
|
{% include "fragments/task_order_review.html" %}
|
||||||
|
@ -307,7 +307,7 @@ def test_task_orders_submit_task_order(client, user_session, task_order):
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"to_factory_args,expected_step",
|
"to_factory_args,expected_step",
|
||||||
[
|
[
|
||||||
({"number": None, "clins": []}, "step_2"),
|
({"number": "", "clins": []}, "step_2"),
|
||||||
({"number": "1234567890123", "clins": []}, "step_3"),
|
({"number": "1234567890123", "clins": []}, "step_3"),
|
||||||
({"number": "1234567890123", "create_clins": [1]}, "step_4"),
|
({"number": "1234567890123", "create_clins": [1]}, "step_4"),
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user