diff --git a/gestaoRaul/comandas/__pycache__/views.cpython-313.pyc b/gestaoRaul/comandas/__pycache__/views.cpython-313.pyc index d5ca5da..bfce7f7 100644 Binary files a/gestaoRaul/comandas/__pycache__/views.cpython-313.pyc and b/gestaoRaul/comandas/__pycache__/views.cpython-313.pyc differ diff --git a/gestaoRaul/comandas/templates/viewcomanda.html b/gestaoRaul/comandas/templates/viewcomanda.html index 023a793..d66f75f 100644 --- a/gestaoRaul/comandas/templates/viewcomanda.html +++ b/gestaoRaul/comandas/templates/viewcomanda.html @@ -86,7 +86,8 @@ Detalhes {{comanda.name}} {{item.product.name}} {% if item.product.cuisine == True %} - + + {{item.product.name}} {% if item.product.cuisine == True %} - + + { switch (data.local) { case 'cozinha': + + + + if (document.getElementById('Fila') !== null && data.tipo === 'add'){ - const novoElemento = document.createElement('div'); - // const novoElemento = document.getElementById('Fila'); - novoElemento.innerHTML = data.message; - var fila = document.getElementById('Fila').appendChild(novoElemento); + + + // const novoElemento = document.createElement('div'); + // novoElemento.innerHTML = data.message; + // var fila = document.getElementById('Fila').appendChild(novoElemento); let valorAtual = document.cookie.replace(/(?:(?:^|.*;\s*)notificacao\s*\=\s*([^;]*).*$)|^.*$/, "$1"); if (valorAtual === 'true') { texto = new SpeechSynthesisUtterance(data.speak); window.speechSynthesis.speak(texto); + setTimeout(function() { + location.reload(); + }, 6000); } } else if (document.getElementById('obs-'+data.id) !== null && data.tipo === 'edit'){ const obs = document.getElementById('obs-'+data.id) - const card = obs.parentNode; - card.style.backgroundColor = 'rgb(243, 165, 75)'; - obs.innerHTML = data.message; + // const card = obs.parentNode; + // card.style.backgroundColor = 'rgb(243, 165, 75)'; + // obs.innerHTML = data.message; let valorAtual = document.cookie.replace(/(?:(?:^|.*;\s*)notificacao\s*\=\s*([^;]*).*$)|^.*$/, "$1"); if (valorAtual === 'true') { texto = new SpeechSynthesisUtterance(data.speak); window.speechSynthesis.speak(texto); + setTimeout(function() { + location.reload(); + }, 6000); } } else if (document.getElementById('m-card-'+data.id) !== null && data.tipo === 'delete'){ - const card = document.getElementById('m-card-'+data.id) - card.style.backgroundColor = 'rgb(253, 69, 69)'; + // const card = document.getElementById('m-card-'+data.id) + // card.style.backgroundColor = 'rgb(253, 69, 69)'; let valorAtual = document.cookie.replace(/(?:(?:^|.*;\s*)notificacao\s*\=\s*([^;]*).*$)|^.*$/, "$1"); if (valorAtual === 'true') { texto = new SpeechSynthesisUtterance(data.speak); window.speechSynthesis.speak(texto); + setTimeout(function() { + location.reload(); + }, 6000); } } diff --git a/gestaoRaul/templates/static/comandas/js/viewcomanda.js b/gestaoRaul/templates/static/comandas/js/viewcomanda.js index dbb348c..ef5b31b 100644 --- a/gestaoRaul/templates/static/comandas/js/viewcomanda.js +++ b/gestaoRaul/templates/static/comandas/js/viewcomanda.js @@ -114,6 +114,7 @@ function printOrder(id) { var item = document.getElementById('id-for-print-'+id).innerText var cliente = document.getElementById('name-comanda').innerText var local = document.getElementById('mesa-comanda').innerText + var obs = document.getElementById(id+'-obsOrder').value const agora = new Date(); var dateString = agora.getDate() + '/' + (agora.getMonth()+1) + '/' + agora.getFullYear() + ' - ' + agora.getHours() + ':' + agora.getMinutes(); console.log(item) @@ -123,14 +124,14 @@ function printOrder(id) { td, th { border-collapse: collapse; - padding-top: 35px; + padding-top: 20px; margin: 20px; text-align: center; font-size: 20px;} ${item} - ${cliente} - ${local} + ${obs} + ${cliente}${local} ${dateString} `;