diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index b2f2737..84b1bf8 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/templates/static/orders/js/orders.js b/gestaoRaul/templates/static/orders/js/orders.js index e8a9157..e7197f9 100644 --- a/gestaoRaul/templates/static/orders/js/orders.js +++ b/gestaoRaul/templates/static/orders/js/orders.js @@ -1,5 +1,7 @@ + + + function openTab(evt, etapa) { - // Declarar todas as abas e conteúdos var i, tabcontent, tablinks; tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { @@ -9,10 +11,8 @@ function openTab(evt, etapa) { for (i = 0; i < tablinks.length; i++) { tablinks[i].className = tablinks[i].className.replace(" active", ""); } - // Mostrar o conteúdo da aba selecionada e marcar a aba como ativa document.getElementById(etapa).style.display = "block"; evt.currentTarget.className += " active"; - // console.log(evt.currentTarget.className += " active"); } function displayBlock(etapa) { @@ -42,4 +42,39 @@ function openTab(evt, etapa) { } - displayBlock('Fila'); \ No newline at end of file + displayBlock('Fila'); + + + + + + function mostrarNotificacao() { + if (Notification.permission != 'granted') { + Notification.requestPermission().then(function(permission) { + if (permission == 'granted') { + var notification = new Notification('Nova Mensagem', { + body: 'Você tem uma nova mensagem!', + icon: 'https://example.com/icon.png' + }); + } + }); + } else { + var notification = new Notification('Nova Mensagem', { + body: 'Você tem uma nova mensagem!', + icon: 'https://example.com/icon.png' + }); + } +} + + + +let i = 0; +while (i < 10) { + setTimeout(function() { + mostrarNotificacao();}, 3000); +} + + + +setTimeout(function() { + mostrarNotificacao();}, 3000);