mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 21:45:41 +00:00
88 lines
2.0 KiB
HTML
88 lines
2.0 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
|
|
|
|
|
|
{% block 'title' %}
|
|
Detalhes {{comanda.name}}
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block 'head' %}
|
|
<link rel="stylesheet" href="{% static 'comandas/css/viewcomanda.css' %}">
|
|
{% endblock %}
|
|
|
|
|
|
{% block 'body' %}
|
|
|
|
<body>
|
|
<div class="grid-container" >
|
|
<button class="button" id="openModal">Adicionar Produto</button>
|
|
<!-- <p>{{comanda.id}}</p> -->
|
|
<p>{{comanda.name}}</p>
|
|
<p>{{comanda.mesa}}</p>
|
|
<p>{{comanda.dt_open}}</p>
|
|
|
|
|
|
<table id="list-products-comanda">
|
|
<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>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="modal" id="Modal-add-product">
|
|
<div class="modal-content">
|
|
<form id="productForm" >
|
|
<h2>Adicionar Produto <button type="button" onclick="closeModal()" style="background-color:red;">Fechar</button></h2>
|
|
<input type="text" id="search-product" name="search-product" placeholder="Buscar Produto" hx-get="{% url 'listProduct' comanda.id %}" hx-trigger="keyup" hx-target="#product-list"><br>
|
|
<div id="product-list" class="grid-list-products">
|
|
{% for product in products %}
|
|
|
|
<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 %}
|
|
</div>
|
|
|
|
<!-- <input type="number" step="1" id="product-qtd" name="qtd" required placeholder="Quantidade"><br> -->
|
|
<!-- <button type="submit">Salvar</button> -->
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script src="{% static 'comandas/js/viewcomanda.js' %}"></script>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
{% endblock %} |