diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index e4e98f7..450ea53 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/orders/__pycache__/views.cpython-310.pyc b/gestaoRaul/orders/__pycache__/views.cpython-310.pyc index 8cee6e7..2b3471b 100644 Binary files a/gestaoRaul/orders/__pycache__/views.cpython-310.pyc and b/gestaoRaul/orders/__pycache__/views.cpython-310.pyc differ diff --git a/gestaoRaul/orders/templates/orders.html b/gestaoRaul/orders/templates/orders.html index 2a62866..dc3aca5 100644 --- a/gestaoRaul/orders/templates/orders.html +++ b/gestaoRaul/orders/templates/orders.html @@ -25,7 +25,6 @@

Pedidos cozinha

-
@@ -37,106 +36,106 @@
-
- {% 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"}}

- +
+ {% 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 %}
- {% 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"}}

- +
+ {% 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 %}
- {% 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"}}

- +
+ {% 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 %}
- {% 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"}}

- +
+ {% 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 %}
- {% endif %} - {% endfor %} -
- - - + +
+ +
+

+

Carregando...

+
{% endblock %} diff --git a/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_fila.html b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_fila.html index 957189c..51bce7a 100644 --- a/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_fila.html +++ b/gestaoRaul/templates/htmx_components/orders/htmx_list_orders_fila.html @@ -10,93 +10,92 @@
{% 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 %} + {% 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 %} + {% 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 %} +
+

{{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 %} + {% 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 %} + {% 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 %} +
+

{{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/midia/icons/loading.svg b/gestaoRaul/templates/static/midia/icons/loading.svg new file mode 100644 index 0000000..283c6ee --- /dev/null +++ b/gestaoRaul/templates/static/midia/icons/loading.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/gestaoRaul/templates/static/orders/css/orders.css b/gestaoRaul/templates/static/orders/css/orders.css index a4cdb8e..ce9aad5 100644 --- a/gestaoRaul/templates/static/orders/css/orders.css +++ b/gestaoRaul/templates/static/orders/css/orders.css @@ -1,24 +1,22 @@ -/* .grid-container { - display: grid; - grid-template-columns: repeat(3, 2fr); - gap: 20px; - max-width: 800px; - margin: 0 auto; - } -.card { - width: 120px; - height: 120px; - background-color: #f2f2f2; - border-radius: 15px; - box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); - text-align: center; - line-height: 120px; - font-size: 20px; - font-weight: bold; - color: #333; - transition: transform 0.2s; - }*/ + @keyframes girar { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +.loading { + + align-items: center; + align-content: center; + align-self: center; + margin: 0 auto; + animation: girar 4s infinite linear; +} + .m-card { /* width: 50px; */ height: 100%; @@ -40,7 +38,6 @@ } - .tab { display: flex; justify-content: space-between; @@ -49,7 +46,6 @@ border-bottom: 2px solid #cccccc93; } -/* Estilo para cada aba */ .tab button { width: 24%; background-color: #4446d636; @@ -60,15 +56,12 @@ border-radius: 20px 20px 0px 0px; } -/* Estilo para a aba ativa */ .tab button.active { background-color: #4446d6; } -/* Estilo para o conteúdo das abas */ .tabcontent { - /* display: none; */ + display: none; padding: 6px 12px; - /* border: 1px solid #ccc; */ - /* border-top: none; */ + } \ 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 c751686..e8a9157 100644 --- a/gestaoRaul/templates/static/orders/js/orders.js +++ b/gestaoRaul/templates/static/orders/js/orders.js @@ -15,6 +15,12 @@ function openTab(evt, etapa) { // console.log(evt.currentTarget.className += " active"); } + function displayBlock(etapa) { + + document.getElementById('loading').style.display = "none"; + document.getElementById(etapa).style.display = "block"; + } + tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { @@ -23,7 +29,17 @@ function openTab(evt, etapa) { tabcontent[0].style.display = "block"; - function delayTab(evt,tab){ - setTimeout(function() { - openTab(evt, tab);}, 200); - } \ No newline at end of file + function delayTab(tab){ + document.getElementById('Fila').style.display = "none"; + document.getElementById('Preparo').style.display = "none"; + document.getElementById('Finalizado').style.display = "none"; + document.getElementById('Entregue').style.display = "none"; + document.getElementById('loading').style.display = "block"; + + + setTimeout(function() { + displayBlock(tab);}, 1000); + } + + + displayBlock('Fila'); \ No newline at end of file