From d7013f0ab819442f7074c6f64606ba2337fb3670 Mon Sep 17 00:00:00 2001 From: Welton Moura Date: Wed, 25 Jun 2025 12:06:59 -0300 Subject: [PATCH] fix: focus input addProduct & feedback addObsOrder & openComanda default 'Sem Mesa' --- .../__pycache__/views.cpython-312.pyc | Bin 8977 -> 8977 bytes gestaoRaul/comandas/templates/comandas.html | 2 +- gestaoRaul/db.sqlite3 | Bin 339968 -> 339968 bytes .../__pycache__/settings.cpython-312.pyc | Bin 4402 -> 4402 bytes .../htmx_list_products_in_comanda.html | 2 +- .../static/comandas/js/viewcomanda.js | 10 +++++++++- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gestaoRaul/comandas/__pycache__/views.cpython-312.pyc b/gestaoRaul/comandas/__pycache__/views.cpython-312.pyc index 97d21b8af8a339e978bea0694695a61915339ae2..68fd0dd6c792d36fcc261eeab7de27db76058909 100644 GIT binary patch delta 20 acmbQ}HqnjyG%qg~0}zz*$86+gQw9JwO9XBJ delta 20 acmbQ}HqnjyG%qg~0}$xNMQr3|Qw9JwAOvy% diff --git a/gestaoRaul/comandas/templates/comandas.html b/gestaoRaul/comandas/templates/comandas.html index 27abe8a..e91ba59 100644 --- a/gestaoRaul/comandas/templates/comandas.html +++ b/gestaoRaul/comandas/templates/comandas.html @@ -55,7 +55,7 @@ Comandas

Abrir Comanda


- + { + textField.focus(); + }, 100); // 50ms de delay (ajuste conforme necessário) +} textField.value = ''; - textField.focus() } @@ -251,7 +255,9 @@ function troco(){ function addOrder(){ obs = document.getElementById('obs') + id = document.getElementById('id-temp').value + var obsPrint = document.getElementById(id+'-obsOrder') tooltipObs = document.getElementById('tooltip-id-'+id) fetch(`/comandas/editOrders/${id}/${obs.value}`, { @@ -266,11 +272,13 @@ function addOrder(){ showToast('✅Pedido atualizado com sucesso!😁','success') tooltipObs.dataset.tooltip = data.obs obs.value = '' + obsPrint.value = data.obs document.getElementById('modal-obs').style.display = 'none'; } }) .catch(error => { + console.log(error) showToast('❌Ocorreu um erro!😢','error') });