2024-06-14 15:41:00 +00:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block title %}FoodOrder{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<h1>FoodOrder</h1>
|
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th>Vendor</th>
|
|
|
|
<td>{{ food_order.foodVendor.name }}</td>
|
|
|
|
</tr>
|
2024-06-27 21:33:32 +00:00
|
|
|
<tr>
|
|
|
|
<th>Created By</th>
|
|
|
|
<td>{{ food_order.createdBy }}</td>
|
|
|
|
</tr>
|
2024-06-14 15:41:00 +00:00
|
|
|
<tr>
|
|
|
|
<th>CreatedAt</th>
|
2024-07-08 15:58:32 +00:00
|
|
|
<td>{{ food_order.createdAt ? food_order.createdAt|date('Y-m-d H:i:s', 'Europe/Berlin') : '' }}</td>
|
2024-06-14 15:41:00 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>ClosedAt</th>
|
2024-07-08 15:58:32 +00:00
|
|
|
<td>{{ food_order.closedAt ? food_order.closedAt|date('Y-m-d H:i:s', 'Europe/Berlin') : '' }}</td>
|
2024-06-14 15:41:00 +00:00
|
|
|
</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 %}
|
2024-06-14 16:48:32 +00:00
|
|
|
|
|
|
|
<h2>Items</h2>
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-06-27 21:33:32 +00:00
|
|
|
<th>username</th>
|
2024-06-14 16:48:32 +00:00
|
|
|
<th>name</th>
|
|
|
|
<th>extras</th>
|
|
|
|
<th>actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2024-08-14 17:41:04 +00:00
|
|
|
{% for item in food_order.orderItemsSortedByName %}
|
2024-06-14 16:48:32 +00:00
|
|
|
<tr>
|
2024-06-27 21:33:32 +00:00
|
|
|
<td>{{ item.createdBy }}</td>
|
2024-06-14 16:48:32 +00:00
|
|
|
<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>
|
|
|
|
|
2024-06-14 15:41:00 +00:00
|
|
|
{% endblock %}
|