mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
refactor:alteração modal de add product na comanda
This commit is contained in:
@@ -13,6 +13,16 @@ Detalhes {{comanda.name}}
|
||||
|
||||
{% block 'head' %}
|
||||
<link rel="stylesheet" href="{% static 'comandas/css/viewcomanda.css' %}">
|
||||
<style>
|
||||
.swal2-popup {
|
||||
position: relative; /* Necessário para o posicionamento absoluto do botão */
|
||||
}
|
||||
.posi {
|
||||
position: absolute !important;
|
||||
top: 0.5em;
|
||||
right: 0.5em;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -22,7 +32,7 @@ Detalhes {{comanda.name}}
|
||||
<input hidden id="id-temp" type="number">
|
||||
<div class="grid-container" >
|
||||
<div style="display: flex;padding: 5px;gap:8px">
|
||||
<button class="btn-primary" id="openModal" onclick="openModal()" popovertarget="addProduct"
|
||||
<button class="btn-primary" id="openModal" onclick="openModal()"
|
||||
{% if comanda.status != 'OPEN'%}
|
||||
disabled
|
||||
{% endif %}
|
||||
@@ -71,6 +81,7 @@ Detalhes {{comanda.name}}
|
||||
</div>
|
||||
<div>
|
||||
<input hidden type="text" id="h-mesaId" value="{{comanda.mesa.id}}">
|
||||
<input hidden type="text" id="id-comanda" value="{{comanda.id}}">
|
||||
<span id="name-comanda">Nome: {{comanda.name}} | </span>
|
||||
<span id="mesa-comanda">Local: {{comanda.mesa}}</span>
|
||||
|
||||
@@ -173,17 +184,13 @@ Detalhes {{comanda.name}}
|
||||
|
||||
|
||||
|
||||
<div id="addProduct" popover class="popover">
|
||||
<div id="toast-add" class="toast-add">
|
||||
<p id="toast-message-add"></p>
|
||||
</div>
|
||||
<form id="productForm" >
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<h2>Adicionar Produto</h2> <img class="close" src="{% static 'midia/icons/close-circle.svg' %}" onclick="closeModal()">
|
||||
</div>
|
||||
|
||||
<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="addProduct" class="popover">
|
||||
<!-- <div id="productForm" > -->
|
||||
{% csrf_token %}
|
||||
|
||||
<input type="text" oninput="searchProduct()" id="search-product" name="search-product" placeholder="Buscar Produto" ><br>
|
||||
<div id="product-list" class="grid-list-products">
|
||||
|
||||
{% for product in products %}
|
||||
|
||||
<div class="card-product" onclick="addProductComanda({{product.id}}, {{comanda.id}}, '{{product.cuisine}}')" >
|
||||
@@ -192,7 +199,7 @@ Detalhes {{comanda.name}}
|
||||
</div >
|
||||
{% endfor %}
|
||||
</div>
|
||||
</form>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user