add index to loop #83

Merged
lubiana merged 1 commit from add_index_to_order into main 2025-02-07 18:34:38 +00:00

View file

@ -40,6 +40,7 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Index</th>
<th>username</th> <th>username</th>
<th>name</th> <th>name</th>
<th>extras</th> <th>extras</th>
@ -49,6 +50,7 @@
<tbody> <tbody>
{% for item in food_order.orderItemsSortedByName %} {% for item in food_order.orderItemsSortedByName %}
<tr> <tr>
<td>{{ loop.index }}</td>
<td>{{ item.createdBy }}</td> <td>{{ item.createdBy }}</td>
<td>{{ item.name }}</td> <td>{{ item.name }}</td>
<td>{{ item.extras }}</td> <td>{{ item.extras }}</td>