form create product | add product in comanda

This commit is contained in:
2024-12-15 18:53:16 -03:00
parent b74d817730
commit a840781473
17 changed files with 72 additions and 41 deletions

View File

@@ -1,9 +1,11 @@
{% for product in products %}
{{co}}
<div class="card">
{{product.name}}
<div class="card" hx-get="{% url 'addProduct' product.id comanda_id %} " hx-trigger="click" hx-target="#list-products-comanda">
{{product.name}} <br>
R$ {{product.price}}
</div>
{% endfor %}
@@ -11,3 +13,5 @@

View File

@@ -0,0 +1,20 @@
<tr>
<th style="text-align: left;">Produto</th>
<th style="text-align: left;">Preço</th>
</tr>
{% for item in consumo%}
<tr>
<td>{{item.product.name}}</td>
<td>R$ {{item.product.price}}</td>
</tr>
{% endfor %}
<tfoot>
<tr>
<td colspan="2" style="text-align: center;">Total R$ {{total}}</td>
</tr>
</tfoot>
</table>