|
|
@ -834,3 +834,47 @@ |
|
|
setInterval(updateTimer, 60000); // alle Minute aktualisieren |
|
|
setInterval(updateTimer, 60000); // alle Minute aktualisieren |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
(() => { |
|
|
|
|
|
const initCombinationOverview = () => { |
|
|
|
|
|
const checkbox = document.getElementById("showAllCombinations"); |
|
|
|
|
|
const table = document.getElementById("combinationOverviewTable"); |
|
|
|
|
|
|
|
|
|
|
|
if (!checkbox || !table) return; |
|
|
|
|
|
if (checkbox.dataset.initialized === "true") return; |
|
|
|
|
|
|
|
|
|
|
|
checkbox.dataset.initialized = "true"; |
|
|
|
|
|
|
|
|
|
|
|
const updateVisibility = () => { |
|
|
|
|
|
const showAll = checkbox.checked; |
|
|
|
|
|
|
|
|
|
|
|
table |
|
|
|
|
|
.querySelectorAll("tbody tr[data-has-remaining]") |
|
|
|
|
|
.forEach(row => { |
|
|
|
|
|
const hasRemaining = |
|
|
|
|
|
row.dataset.hasRemaining === "true"; |
|
|
|
|
|
|
|
|
|
|
|
row.classList.toggle( |
|
|
|
|
|
"d-none", |
|
|
|
|
|
!showAll && !hasRemaining |
|
|
|
|
|
); |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
checkbox.addEventListener("change", updateVisibility); |
|
|
|
|
|
|
|
|
|
|
|
updateVisibility(); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener( |
|
|
|
|
|
"DOMContentLoaded", |
|
|
|
|
|
initCombinationOverview |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener( |
|
|
|
|
|
"turbo:load", |
|
|
|
|
|
initCombinationOverview |
|
|
|
|
|
); |
|
|
|
|
|
})(); |
|
|
|
|
|
</script> |