85 lines
2.3 KiB
Twig
85 lines
2.3 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}FoodOrder{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>FoodOrder</h1>
|
|
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<th>StartedByName</th>
|
|
<td>{{ food_order.startedByName }}</td>
|
|
</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>
|
|
<td>{{ food_order.closedAt ? food_order.closedAt|date('Y-m-d H:i:s') : '' }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name(s)</th>
|
|
<th>possible price</th>
|
|
<th>actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for lel in food_order.groupedOrderItems %}
|
|
<tr>
|
|
<td>
|
|
|
|
{{ lel.item.menuItem.aliases|map(i => i.name)|join(' / ') }}
|
|
</td>
|
|
<td>
|
|
{{ lel.item.menuItem.price }}
|
|
</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> |
|
|
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</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>
|
|
{{ item.aliases|map(i => i.name)|join(' / ') }}
|
|
</td>
|
|
<td>
|
|
{{ item.price }}
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_foodorder_add_item', {foodOrder: food_order.id, menuItem: item.id}) }}">join</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
<a href="{{ path('app_food_order_index') }}">back to list</a>
|
|
|
|
<a href="{{ path('app_food_order_edit', {'id': food_order.id}) }}">edit</a>
|
|
|
|
{{ include('food_order/_delete_form.html.twig') }}
|
|
{% endblock %}
|