diff --git a/static/pages/user_select.js b/static/pages/user_select.js index 5724ab0..0806922 100644 --- a/static/pages/user_select.js +++ b/static/pages/user_select.js @@ -12,8 +12,22 @@ let pinInput4 = document.getElementById('pinInput4'); let pinError = document.getElementById('pinError'); +let lastActivity = new Date().getTime(); +let lastActivityTimeout = 1000 * 60 * 5; // 5 minutes + let currentUser = null; +document.addEventListener('click', function() { + lastActivity = new Date().getTime(); +}); + +setInterval(function() { + let now = new Date().getTime(); + if(now - lastActivity > lastActivityTimeout) { + window.location.href = '/'; + } +}, 1000); + // Attach event listeners to all numpad buttons let numpadButtons = numpad.getElementsByTagName('button'); for(let i = 0; i < numpadButtons.length; i++) { diff --git a/views/admin/products.eta b/views/admin/products.eta index acfddc8..998788f 100644 --- a/views/admin/products.eta +++ b/views/admin/products.eta @@ -3,7 +3,8 @@ Produktverwaltung - + + Neues Produkt anlegen Lager nachfüllen
+ + Neues Produkt anlegen Lager nachfüllen
+ Neues Produkt anlegen Lager nachfüllen