websocket part2 | notificação

This commit is contained in:
2025-03-04 22:17:30 -03:00
parent 3a7cbfc413
commit d366d2db97
11 changed files with 195 additions and 91 deletions

View File

@@ -41,7 +41,7 @@
<div id="Fila" class="tabcontent">
{% for order in orders %}
{% if order.preparing == None and order.productComanda != Null %}
<div class="m-card"
<div class="m-card" id="m-card-{{order.id}}"
{% if order.productComanda == Null %}
style="background-color: rgb(253, 69, 69);"
{% elif order.obs != '' %}
@@ -61,14 +61,13 @@
</div>
{% endif %}
{% endfor %}
<!-- <output id="fila"></output> -->
</div>
<div id="Preparo" class="tabcontent">
{% for order in orders %}
{% if order.finished == None and order.preparing != None %}
<div class="m-card"
<div class="m-card" id="m-card-{{order.id}}"
{% if order.productComanda == Null %}
style="background-color: rgb(253, 69, 69);"
{% elif order.obs != '' %}
@@ -93,7 +92,7 @@
<div id="Finalizado" class="tabcontent">
{% for order in orders %}
{% if order.delivered == None and order.finished != None %}
<div class="m-card"
<div class="m-card" id="m-card-{{order.id}}"
{% if order.productComanda == Null %}
style="background-color: rgb(253, 69, 69);"
{% elif order.obs != '' %}
@@ -118,7 +117,7 @@
<div id="Entregue" class="tabcontent">
{% for order in orders %}
{% if order.delivered != None %}
<div class="m-card"
<div class="m-card" id="m-card-{{order.id}}"
{% if order.productComanda == Null %}
style="background-color: rgb(253, 69, 69);"
{% elif order.obs != '' %}

View File

@@ -12,7 +12,7 @@ from gestaoRaul.decorators import group_required
async def enviar_mensagem(message):
uri = "ws://localhost:8765" # Substitua pela URI do seu servidor WebSocket
uri = "ws://192.168.1.150:8765"
async with websockets.connect(uri) as websocket:
await websocket.send(message)
print(f"> Enviado: {message}")