add orderstuff

This commit is contained in:
lubiana 2025-06-14 22:43:27 +02:00
parent 51fb951b2b
commit d7a61f6d0e
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
9 changed files with 209 additions and 10 deletions

View file

@ -21,14 +21,36 @@
</tr>
<tr>
<th>Status</th>
<td>{{ order.status }}</td>
<td>{{ order.status.value }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_order_index') }}">back to list</a>
<h2>Order Items</h2>
{% if order.orderItems|length > 0 %}
<table class="table">
<thead>
<tr>
<th>Drink Type</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
{% for item in order.orderItems %}
<tr>
<td>{{ item.drinkType.name }}</td>
<td>{{ item.quantity }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No items in this order.</p>
{% endif %}
<a href="{{ path('app_order_edit', {'id': order.id}) }}">edit</a>
<a href="{{ path('app_order_index') }}" class="btn btn-secondary">Back to list</a>
<a href="{{ path('app_order_edit', {'id': order.id}) }}" class="btn btn-primary">Edit</a>
{{ include('order/_delete_form.html.twig') }}
{% endblock %}