feat: mudança de etapa do pedido da cozinha

This commit is contained in:
2025-01-10 20:42:14 -03:00
parent bde7014717
commit 5c1188ecde
29 changed files with 155 additions and 10 deletions

View File

@@ -26,7 +26,7 @@
<div id="list-orders">
<div class="tab">
<button class="tablinks" onclick="openTab(event, 'Fila')">Fila</button>
@@ -37,7 +37,7 @@
<div id="Fila" class="tabcontent">
{% for order in orders %}
{% if order.preparing == None %}
{% if order.preparing == None and order.productComanda != Null %}
<div class="m-card"
{% if order.productComanda == Null %}
style="background-color: rgb(253, 69, 69);"
@@ -49,12 +49,15 @@
<h4>{{order.obs}} </h4>
<h4>{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}} </h4>
<h4>{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}</h4>
<button>Preparar</button>
<button
hx-get="{% url 'preparing' order.id %} " hx-trigger="click" hx-target="#list-orders"
>Preparar</button>
</div>
{% endif %}
{% endfor %}
</div>
<div id="Preparo" class="tabcontent">
{% for order in orders %}
{% if order.finished == None and order.preparing != None %}
@@ -70,7 +73,9 @@
<h4>{{order.obs}} </h4>
<h4>{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}} </h4>
<h4>{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}</h4>
<button>Preparar</button>
<button
hx-get="{% url 'finished' order.id %} " hx-trigger="click" hx-target="#list-orders"
>Finalizar</button>
</div>
{% endif %}
{% endfor %}
@@ -91,7 +96,9 @@
<h4>{{order.obs}} </h4>
<h4>{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}} </h4>
<h4>{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}</h4>
<button>Preparar</button>
<button
hx-get="{% url 'delivered' order.id %} " hx-trigger="click" hx-target="#list-orders"
>Entregar</button>
</div>
{% endif %}
{% endfor %}
@@ -112,12 +119,12 @@
<h4>{{order.obs}} </h4>
<h4>{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}} </h4>
<h4>{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}</h4>
<button>Preparar</button>
<!-- <button>Preparar</button> -->
</div>
{% endif %}
{% endfor %}
</div>
</div>