This commit is contained in:
Rainer 2025-04-29 23:36:37 +02:00
commit ce1095bb24
27 changed files with 621 additions and 0 deletions

20
app/static/js/zuordnen.js Normal file
View file

@ -0,0 +1,20 @@
document.getElementById("zuordnungForm").addEventListener("submit", function(e) {
e.preventDefault();
const zuordnungen = [];
document.querySelectorAll(".zuordnung").forEach(row => {
const zeit = row.querySelector("span").innerText;
const fahrer = row.querySelector("select").value;
if (fahrer) {
zuordnungen.push({ zeit: zeit, fahrer: fahrer });
}
});
fetch("/zeit_zuordnen", {
method: "POST",
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ zuordnungen: zuordnungen })
}).then(() => {
window.location.href = "/ergebnis";
});
});