{% extends 'base.html.twig' %}
{% block body %}
<h1 class="mt-4">Session</h1>
<table class="table mt-4">
<tbody>
<tr>
<th>Date</th>
<td>{{ session.date.format('d/m/Y') }}</td>
</tr>
<tr>
<th>Recipes</th>
<td>
{% for recipe in session.recipes %}
{{ recipe.name ~ ',' }}
{% endfor %}
</td>
</tr>
<tr>
<th>Gesamtpreis</th>
<td>{{ totalPrice }}</td>
</tr>
</tbody>
</table>
<div class="row row-cols-1 row-cols-md-2 g-4">
{% for storeArea, products in sortedProducts %}
<div class="col">
<div class="card">
<div class="card-header">{{ storeArea }}</div>
<div class="btn-group-vertical" role="group" aria-label="Basic checkbox toggle button group">
{% for product in products %}
{% set counter = ( counter | default(0) ) + 1 %}
<input type="checkbox" class="btn-check" id="{{ product ~ counter }}" autocomplete="off">
<label class="btn btn-outline-primary" for="{{ product ~ counter }}"> {{ product }}</label>
{% endfor %}
</div>
</div>
</div>
{% endfor %}
</div>
<div class="d-flex justify-content-between mt-5 ">
<a class="btn btn-primary" href="{{ path('app_session_index') }}">Back to list</a>
{{ include('session/_delete_form.html.twig') }}
</div>
{% endblock %}