some improvements

This commit is contained in:
derlole
2025-05-09 18:36:01 +00:00
parent 83e6ff3958
commit 41b276c734
16 changed files with 283 additions and 42 deletions

View File

@@ -95,4 +95,40 @@ function toggleMachine() {
.then(data => {
console.log(data);
});
}
}
function waterRefill(){
if (gebId("water-fill").parentElement.classList.contains("deniePress")){
return;
}
console.log(water)
if (water.fill == 100){
alert("Wassertank ist bereits voll!");
return;
}
console.log("waterRefill");
fetch('/unsecure/refill-water', { method: 'POST' })
.then(res => res.json())
.then(data => {
console.log(data);
});
}
function beansRefill(){
if (gebId("beans-fill").parentElement.classList.contains("deniePress")){
return;
}
if (beans.fill == 100){
alert("Bohnentank ist bereits voll!");
return;
}
console.log("beansRefill");
fetch('/unsecure/refill-beans', { method: 'POST' })
.then(res => res.json())
.then(data => {
console.log(data);
});
}
function showCoffeeHistory(){
window.location.href = "/unsecure/coffees-made";
}