mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
fix: bug retorno do obs da order no tootip do viewcomanda
This commit is contained in:
BIN
gestaoRaul/comandas/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/admin.cpython-312.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/admin.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/apps.cpython-312.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/apps.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/htmx_views.cpython-312.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/htmx_views.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/models.cpython-312.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/models.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/urls.cpython-312.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/urls.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/views.cpython-312.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/views.cpython-312.pyc
Normal file
Binary file not shown.
@@ -14,13 +14,16 @@ import asyncio
|
||||
import websockets
|
||||
|
||||
async def enviar_mensagem(msg):
|
||||
uri = "ws://192.168.1.150:8765"
|
||||
async with websockets.connect(uri) as websocket:
|
||||
await websocket.send(msg)
|
||||
print(f"> Enviado: {msg}")
|
||||
try:
|
||||
uri = "ws://192.168.1.150:8765"
|
||||
async with websockets.connect(uri) as websocket:
|
||||
await websocket.send(msg)
|
||||
print(f"> Enviado: {msg}")
|
||||
|
||||
resposta = await websocket.recv()
|
||||
print(f"< Recebido: {resposta}")
|
||||
resposta = await websocket.recv()
|
||||
print(f"< Recebido: {resposta}")
|
||||
except Exception as e:
|
||||
print(f"Erro ao enviar mensagem: {e}")
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -59,11 +59,8 @@ def has_group(user, group_name):
|
||||
|
||||
@register.filter(name='obsOrder')
|
||||
def obsOrder(id):
|
||||
product_comanda_obj = ProductComanda.objects.get(pk=id) # Supondo que você tenha o ID do ProductComanda
|
||||
|
||||
produto_associado = product_comanda_obj.product
|
||||
|
||||
pedidos_relacionados = Order.objects.filter(id_product=produto_associado)
|
||||
pedido = pedidos_relacionados[0]
|
||||
|
||||
return pedido.obs
|
||||
productComanda_obj = ProductComanda.objects.get(pk=id)
|
||||
order = Order.objects.get(productComanda=productComanda_obj)
|
||||
return order.obs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user