56 lines
1.6 KiB
Twig
56 lines
1.6 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Order{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>Order</h1>
|
|
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<th>Id</th>
|
|
<td>{{ order.id }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>CreatedAt</th>
|
|
<td>{{ order.createdAt ? order.createdAt|date('Y-m-d H:i:s') : '' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>UpdatedAt</th>
|
|
<td>{{ order.updatedAt ? order.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Status</th>
|
|
<td>{{ order.status.value }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<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_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 %}
|