2024-02-05 15:16:43 +00:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block title %}FoodOrder{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<h1>FoodOrder</h1>
|
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th>StartedByName</th>
|
2024-02-12 21:03:17 +00:00
|
|
|
<td>{{ food_order.startedBy }}</td>
|
2024-02-05 15:16:43 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Id</th>
|
|
|
|
<td>{{ food_order.id }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>StartedAt</th>
|
|
|
|
<td>{{ food_order.startedAt ? food_order.startedAt|date('Y-m-d H:i:s') : '' }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>ClosedAt</th>
|
2024-02-12 21:03:17 +00:00
|
|
|
<td>
|
|
|
|
{% if food_order.closedAt is not null%}
|
|
|
|
{{ food_order.closedAt|date('Y-m-d H:i:s') }}
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ path('app_foodorder_close', {id: food_order.id}) }}">close</a>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2024-02-05 15:16:43 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name(s)</th>
|
2024-02-13 21:48:56 +00:00
|
|
|
<th>Extra(s)</th>
|
2024-02-05 15:16:43 +00:00
|
|
|
<th>possible price</th>
|
|
|
|
<th>actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2024-02-13 21:48:56 +00:00
|
|
|
{% for orderItem in food_order.groupedOrderItems %}
|
2024-02-05 15:16:43 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
2024-02-17 11:30:54 +00:00
|
|
|
{{ orderItem.menuItem.menuItemAliases|map(i => i.name)|join(' / ') }}
|
2024-02-13 21:48:56 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-02-17 11:30:54 +00:00
|
|
|
{{ orderItem.extras|map(i => i.name)|join(' / ') }}
|
2024-02-05 15:16:43 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-02-17 11:30:54 +00:00
|
|
|
{{ orderItem.menuItem.price|cents_to_eur }}
|
2024-02-05 15:16:43 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name(s)</th>
|
|
|
|
<th>possible price</th>
|
|
|
|
<th>actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% for item in menu_items %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-02-12 21:03:17 +00:00
|
|
|
{{ item.menuItemAliases|map(i => i.name)|join(' / ') }}
|
2024-02-05 15:16:43 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-02-12 21:03:17 +00:00
|
|
|
{{ item.price|cents_to_eur }}
|
2024-02-05 15:16:43 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-02-12 21:03:17 +00:00
|
|
|
{% if food_order.closedAt is null %}
|
|
|
|
<a
|
2024-02-13 20:43:30 +00:00
|
|
|
href="{{ path(
|
|
|
|
'app_foodorder_add_item',
|
|
|
|
{
|
|
|
|
foodOrder: food_order.id,
|
|
|
|
menuItem: item.id
|
|
|
|
}
|
|
|
|
) }}"
|
2024-02-12 21:03:17 +00:00
|
|
|
>add</a>
|
|
|
|
{% endif %}
|
2024-02-05 15:16:43 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|