remove unneeded test
All checks were successful
/ ls (pull_request) Successful in 30s

add order item stuff
This commit is contained in:
lubiana 2024-06-14 18:48:32 +02:00
parent 68b4096bb0
commit 814dc4a41b
No known key found for this signature in database
11 changed files with 175 additions and 113 deletions

View file

@ -21,11 +21,39 @@
</tr>
</tbody>
</table>
<a class="button" href="{{ path('app_food_order_index') }}">back to list</a>
{% if(food_order.isClosed) %}
<a class="button" href="{{ path('app_food_order_open', {'id': food_order.id}) }}">reopen</a>
{% else %}
<a class="button" href="{{ path('app_food_order_close', {'id': food_order.id}) }}">close</a>
{% endif %}
<h2>Items</h2>
<table class="table">
<thead>
<tr>
<th>name</th>
<th>extras</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for item in food_order.orderItems %}
<tr>
<td>{{ item.name }}</td>
<td>{{ item.extras }}</td>
<td>
{% if(food_order.isClosed) %}
{% else %}
<a href="{{ path('app_order_item_edit', {'id': item.id}) }}">edit</a>
<a href="{{ path('app_order_item_copy', {'id': item.id}) }}">copy</a>
<a href="{{ path('app_order_item_delete', {'id': item.id}) }}">remove</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="button" href="{{ path('app_order_item_new', {'foodOrder': food_order.id}) }}">New Item</a>
{% endblock %}