diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index 42e953c..e4e98f7 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/orders/__pycache__/views.cpython-313.pyc b/gestaoRaul/orders/__pycache__/views.cpython-313.pyc index 32f21e8..3ea1076 100644 Binary files a/gestaoRaul/orders/__pycache__/views.cpython-313.pyc and b/gestaoRaul/orders/__pycache__/views.cpython-313.pyc differ diff --git a/gestaoRaul/orders/templates/orders.html b/gestaoRaul/orders/templates/orders.html index 508ff2e..2a62866 100644 --- a/gestaoRaul/orders/templates/orders.html +++ b/gestaoRaul/orders/templates/orders.html @@ -35,6 +35,8 @@ +
+
{% for order in orders %} {% if order.preparing == None and order.productComanda != Null %} @@ -50,8 +52,8 @@

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

Atendente: {{order.id_comanda.user.first_name}}

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

-
{% endif %} @@ -75,8 +77,8 @@

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

Atendente: {{order.id_comanda.user.first_name}}

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

-
{% endif %} @@ -99,8 +101,8 @@

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

Atendente: {{order.id_comanda.user.first_name}}

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

- {% endif %} @@ -125,6 +127,7 @@

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ {% endif %} {% endfor %} diff --git a/gestaoRaul/orders/views.py b/gestaoRaul/orders/views.py index 7662515..37c9ce1 100644 --- a/gestaoRaul/orders/views.py +++ b/gestaoRaul/orders/views.py @@ -19,7 +19,7 @@ def preparing(request, order_id): order.save() fifteen_hours_ago = timezone.now() - timezone.timedelta(hours=15) orders = Order.objects.filter(queue__gte=fifteen_hours_ago ) - return render(request, 'htmx_components/orders/htmx_list_orders.html',{'orders': orders}) + return render(request, 'htmx_components/orders/htmx_list_orders_fila.html',{'orders': orders}) @group_required(groupName='Cozinha') @@ -29,7 +29,7 @@ def finished(request, order_id): order.save() fifteen_hours_ago = timezone.now() - timezone.timedelta(hours=15) orders = Order.objects.filter(queue__gte=fifteen_hours_ago ) - return render(request, 'htmx_components/orders/htmx_list_orders.html',{'orders': orders}) + return render(request, 'htmx_components/orders/htmx_list_orders_fila.html',{'orders': orders}) @group_required(groupName='Garçom') def delivered(request, order_id): @@ -38,4 +38,4 @@ def delivered(request, order_id): order.save() fifteen_hours_ago = timezone.now() - timezone.timedelta(hours=15) orders = Order.objects.filter(queue__gte=fifteen_hours_ago ) - return render(request, 'htmx_components/orders/htmx_list_orders.html',{'orders': orders}) + return render(request, 'htmx_components/orders/htmx_list_orders_fila.html',{'orders': orders}) diff --git a/gestaoRaul/templates/htmx_components/orders/htmx_list_orders.html b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_entregue.html similarity index 100% rename from gestaoRaul/templates/htmx_components/orders/htmx_list_orders.html rename to gestaoRaul/templates/htmx_components/orders/htmx_list_orders_entregue.html diff --git a/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_fila.html b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_fila.html new file mode 100644 index 0000000..957189c --- /dev/null +++ b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_fila.html @@ -0,0 +1,102 @@ + + + + + +
+ {% for order in orders %} + {% if order.preparing == None and order.productComanda != Null %} +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ + +
+ {% for order in orders %} + {% if order.finished == None and order.preparing != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ +
+ {% for order in orders %} + {% if order.delivered == None and order.finished != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ +
+ {% for order in orders %} + {% if order.delivered != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+
+ {% endif %} + {% endfor %} +
\ No newline at end of file diff --git a/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_preparo.html b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_preparo.html new file mode 100644 index 0000000..8f986e6 --- /dev/null +++ b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_preparo.html @@ -0,0 +1,103 @@ + + + +
+ + + + +
+ +
+ {% for order in orders %} + {% if order.preparing == None and order.productComanda != Null %} +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ + +
+ {% for order in orders %} + {% if order.finished == None and order.preparing != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ +
+ {% for order in orders %} + {% if order.delivered == None and order.finished != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ +
+ {% for order in orders %} + {% if order.delivered != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
\ No newline at end of file diff --git a/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_pronto.html b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_pronto.html new file mode 100644 index 0000000..8f986e6 --- /dev/null +++ b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_pronto.html @@ -0,0 +1,103 @@ + + + +
+ + + + +
+ +
+ {% for order in orders %} + {% if order.preparing == None and order.productComanda != Null %} +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ + +
+ {% for order in orders %} + {% if order.finished == None and order.preparing != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ +
+ {% for order in orders %} + {% if order.delivered == None and order.finished != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
+ +
+ {% for order in orders %} + {% if order.delivered != None %} + +
+

{{order.id_product.name}}

+

{{order.obs}}

+

{{order.id_comanda.name}} - {{order.id_comanda.mesa.name}}

+

Atendente: {{order.id_comanda.user.first_name}}

+

{{order.queue|date:"D"}} {{order.queue|date:"d/m/Y - H:i"}}

+ +
+ {% endif %} + {% endfor %} +
\ No newline at end of file diff --git a/gestaoRaul/templates/static/orders/js/orders.js b/gestaoRaul/templates/static/orders/js/orders.js index 7589b3c..c751686 100644 --- a/gestaoRaul/templates/static/orders/js/orders.js +++ b/gestaoRaul/templates/static/orders/js/orders.js @@ -20,4 +20,10 @@ function openTab(evt, etapa) { for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } - tabcontent[0].style.display = "block"; \ No newline at end of file + tabcontent[0].style.display = "block"; + + + function delayTab(evt,tab){ + setTimeout(function() { + openTab(evt, tab);}, 200); + } \ No newline at end of file