init
This commit is contained in:
commit
ce1095bb24
27 changed files with 621 additions and 0 deletions
20
app/static/js/zuordnen.js
Normal file
20
app/static/js/zuordnen.js
Normal 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";
|
||||
});
|
||||
});
|
||||
Reference in a new issue