mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
feat: edit comanda
This commit is contained in:
@@ -60,7 +60,7 @@ Comandas
|
||||
|
||||
</select>
|
||||
<button type="submit">Abrir</button>
|
||||
<button type="button" onclick="closeModal()" style="background-color:red;">Fechar</button>
|
||||
<button type="button" onclick="closeModal()" style="background-color:red;">Cancelar</button>
|
||||
</form>
|
||||
</article>
|
||||
</dialog >
|
||||
|
||||
@@ -63,9 +63,16 @@ Detalhes {{comanda.name}}
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<input hidden type="text" id="h-mesaId" value="{{comanda.mesa.id}}">
|
||||
<span id="name-comanda">Nome: {{comanda.name}} | </span>
|
||||
<span id="mesa-comanda">Mesa: {{comanda.mesa}}</span>
|
||||
|
||||
<img
|
||||
onclick="openModalAlter()"
|
||||
src="{% static 'midia/icons/edit.svg' %}"
|
||||
style="width: 35px; height: 35px; cursor: pointer;">
|
||||
</img>
|
||||
|
||||
</div>
|
||||
<p id="open-comanda">Aberta em: {{comanda.dt_open|date:"D"}} {{comanda.dt_open|date:"d/m/Y - H:i"}}</p>
|
||||
|
||||
@@ -164,6 +171,31 @@ Detalhes {{comanda.name}}
|
||||
</article>
|
||||
</dialog>
|
||||
|
||||
|
||||
<dialog id="Modal-alter-comanda">
|
||||
<article >
|
||||
<form id="form-comanda" method="post" action="{% url 'editComanda' %}">
|
||||
{% csrf_token %}
|
||||
<h2>Editar Comanda</h2>
|
||||
<input hidden type="text" name="h-comandaId" id="h-comandaId" value="{{comanda.id}}">
|
||||
|
||||
<input type="text" id="nameComanda" name="nameComanda" required placeholder="Nome"><br>
|
||||
|
||||
<select name="select-mesa" id="select-mesa" >
|
||||
|
||||
{% for mesa in mesas %}
|
||||
<option value="{{mesa.id}}">{{mesa.name}}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
<button type="submit">Alterar</button>
|
||||
<button type="button" onclick="closeModalAlter()" style="background-color:red;">Cancelar</button>
|
||||
</form>
|
||||
</article>
|
||||
</dialog >
|
||||
|
||||
|
||||
|
||||
<script src="{% static 'comandas/js/viewcomanda.js' %}"></script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user