add item extras

This commit is contained in:
lubiana 2024-02-13 22:48:56 +01:00
parent 1dab51005a
commit 1a99758a0c
6 changed files with 53 additions and 15 deletions

View file

@ -35,24 +35,27 @@
<thead>
<tr>
<th>Name(s)</th>
<th>Extra(s)</th>
<th>possible price</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for lel in food_order.groupedOrderItems %}
{% for orderItem in food_order.groupedOrderItems %}
<tr>
<td>
{{ lel.item.menuItem.menuItemAliases|map(i => i.name)|join(' / ') }}
{{ orderItem.item.menuItem.menuItemAliases|map(i => i.name)|join(' / ') }}
</td>
<td>
{{ lel.item.menuItem.price|cents_to_eur }}
{{ orderItem.item.extras|map(i => i.name)|join(' / ') }}
</td>
<td>
{{ lel.amount }} |
<a href="{{ path('app_foodorder_add_item', {foodOrder: food_order.id, menuItem: lel.item.menuItem.id}) }}">+1</a> |
<a href="{{ path('app_foodorder_remove_item', {foodOrder: food_order.id, orderItem: lel.item.id}) }}">-1</a> |
{{ orderItem.item.menuItem.price|cents_to_eur }}
</td>
<td>
{{ orderItem.amount }} |
<a href="{{ path('app_foodorder_add_item', {foodOrder: food_order.id, menuItem: orderItem.item.menuItem.id}) }}">+1</a> |
<a href="{{ path('app_foodorder_remove_item', {foodOrder: food_order.id, orderItem: orderItem.item.id}) }}">-1</a> |
</td>
</tr>