mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
page orders | add duplicati container
This commit is contained in:
@@ -51,7 +51,7 @@ function cookieNotificacao() {
|
||||
}
|
||||
}
|
||||
|
||||
const websocket = new WebSocket('ws://0.0.0.0:8765');
|
||||
const websocket = new WebSocket('ws://192.168.0.150:8765');
|
||||
const nomeUsuario = document.getElementById('user-info').textContent;
|
||||
|
||||
websocket.addEventListener('open', (event) => {
|
||||
@@ -64,37 +64,34 @@ websocket.addEventListener('message', (event) => {
|
||||
switch (data.local) {
|
||||
case 'cozinha':
|
||||
|
||||
|
||||
|
||||
|
||||
if (document.getElementById('Fila') !== null && data.tipo === 'add'){
|
||||
|
||||
|
||||
// const novoElemento = document.createElement('div');
|
||||
// novoElemento.innerHTML = data.message;
|
||||
// var fila = document.getElementById('Fila').appendChild(novoElemento);
|
||||
var novoElemento = document.createElement('div');
|
||||
novoElemento.innerHTML = data.message;
|
||||
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);
|
||||
// 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);
|
||||
// setTimeout(function() {
|
||||
// location.reload();
|
||||
// }, 6000);
|
||||
}
|
||||
}
|
||||
else if (document.getElementById('m-card-'+data.id) !== null && data.tipo === 'delete'){
|
||||
|
||||
@@ -1,37 +1,62 @@
|
||||
|
||||
@keyframes girar {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
|
||||
h4{
|
||||
color: black;
|
||||
}
|
||||
|
||||
.container {
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
padding: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@keyframes jump {
|
||||
0% {
|
||||
transform: scale(0.0);
|
||||
}
|
||||
70% {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.kanban-board {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.loading {
|
||||
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
align-self: center;
|
||||
margin: 0 auto;
|
||||
animation: girar 4s infinite linear;
|
||||
.column {
|
||||
flex: 1;
|
||||
border: 1px solid #535353;
|
||||
border-radius: 6px;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.cards-container {
|
||||
flex-grow: 1; /* Permite que o container de cards ocupe o espaço restante */
|
||||
overflow-y: auto; /* Adiciona a barra de rolagem vertical */
|
||||
max-height: 85vh; /* Defina uma altura máxima para ativar o scroll */
|
||||
padding-right: 5px; /* Espaçamento para não cortar a barra de rolagem */
|
||||
}
|
||||
|
||||
.cards-container::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.cards-container::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.cards-container::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.cards-container::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
}
|
||||
|
||||
|
||||
.m-card {
|
||||
/* width: 50px; */
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 10px;
|
||||
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
|
||||
@@ -46,51 +71,24 @@
|
||||
animation: jump 0.7s;
|
||||
}
|
||||
|
||||
h4{
|
||||
color: black;
|
||||
|
||||
@media screen and (max-width: 1028px) {
|
||||
.container {
|
||||
padding: 0px;
|
||||
gap: 0px;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
|
||||
}
|
||||
|
||||
.kanban-board {
|
||||
gap: 0px;
|
||||
}
|
||||
|
||||
.column {
|
||||
|
||||
.tab {
|
||||
display: flex;
|
||||
padding-top: 15px;
|
||||
justify-content: space-between;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
border-bottom: 2px solid rgba(86, 187, 255, 0.192);
|
||||
}
|
||||
padding: 0px;
|
||||
|
||||
.tab button {
|
||||
width: 24%;
|
||||
background-color: #999aeb00;
|
||||
padding: 10px 10px;
|
||||
transition: 0.6s;
|
||||
border-radius: 20px 20px 0px 0px;
|
||||
align-items: center;
|
||||
border-color: rgba(86, 187, 255, 0.192);
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.tab button.active {
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
border-color: rgba(86, 187, 255, 0.192);
|
||||
background: var(--main-gradient);
|
||||
box-shadow: 0px 0px 15px rgba(86, 187, 255, 0.815);
|
||||
}
|
||||
|
||||
.tabcontent {
|
||||
display: none;
|
||||
padding: 6px 12px;
|
||||
|
||||
}
|
||||
|
||||
#list-orders{
|
||||
justify-self: center;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
#list-orders{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -4,49 +4,49 @@ function reloadPage(){
|
||||
location.reload();}, 3000);
|
||||
}
|
||||
|
||||
function openTab(evt, etapa) {
|
||||
var i, tabcontent, tablinks;
|
||||
tabcontent = document.getElementsByClassName("tabcontent");
|
||||
for (i = 0; i < tabcontent.length; i++) {
|
||||
tabcontent[i].style.display = "none";
|
||||
}
|
||||
tablinks = document.getElementsByClassName("tablinks");
|
||||
for (i = 0; i < tablinks.length; i++) {
|
||||
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
||||
}
|
||||
document.getElementById(etapa).style.display = "block";
|
||||
evt.currentTarget.className += " active";
|
||||
}
|
||||
// function openTab(evt, etapa) {
|
||||
// var i, tabcontent, tablinks;
|
||||
// tabcontent = document.getElementsByClassName("tabcontent");
|
||||
// for (i = 0; i < tabcontent.length; i++) {
|
||||
// tabcontent[i].style.display = "none";
|
||||
// }
|
||||
// tablinks = document.getElementsByClassName("tablinks");
|
||||
// for (i = 0; i < tablinks.length; i++) {
|
||||
// tablinks[i].className = tablinks[i].className.replace(" active", "");
|
||||
// }
|
||||
// document.getElementById(etapa).style.display = "block";
|
||||
// evt.currentTarget.className += " active";
|
||||
// }
|
||||
|
||||
function displayBlock(etapa) {
|
||||
// function displayBlock(etapa) {
|
||||
|
||||
document.getElementById('loading').style.display = "none";
|
||||
document.getElementById(etapa).style.display = "block";
|
||||
}
|
||||
// document.getElementById('loading').style.display = "none";
|
||||
// document.getElementById(etapa).style.display = "block";
|
||||
// }
|
||||
|
||||
|
||||
tabcontent = document.getElementsByClassName("tabcontent");
|
||||
for (i = 0; i < tabcontent.length; i++) {
|
||||
tabcontent[i].style.display = "none";
|
||||
}
|
||||
tabcontent[0].style.display = "block";
|
||||
// tabcontent = document.getElementsByClassName("tabcontent");
|
||||
// for (i = 0; i < tabcontent.length; i++) {
|
||||
// tabcontent[i].style.display = "none";
|
||||
// }
|
||||
// tabcontent[0].style.display = "block";
|
||||
|
||||
|
||||
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";
|
||||
// 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);
|
||||
// reloadPage();
|
||||
}
|
||||
// setTimeout(function() {
|
||||
// displayBlock(tab);}, 1000);
|
||||
// // reloadPage();
|
||||
// }
|
||||
|
||||
|
||||
displayBlock('Fila');
|
||||
// displayBlock('Fila');
|
||||
|
||||
|
||||
// function mostrarNotificacao(titulo,corpo,grupo) {
|
||||
|
||||
Reference in New Issue
Block a user