From 04880cc9ca11f3939e8e296d356a5270a46ef998 Mon Sep 17 00:00:00 2001 From: Samuel Zielke Date: Tue, 1 Sep 2026 09:41:46 +0200 Subject: [PATCH 1/3] Update Django - Newest Python Bug --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 762f9ff..404437c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ asgiref==3.8.1 -Django==5.1.1 +Django==5.2.17 django-pwa==2.0.0 gunicorn==23.0.0 mysqlclient==2.2.4 From fdafc901f144b659882d2c90b778bcc36c3b48ee Mon Sep 17 00:00:00 2001 From: Samuel Zielke Date: Tue, 1 Sep 2026 09:42:26 +0200 Subject: [PATCH 2/3] Hotfix: Jahreswechel --- app/static/app/js/dbcontrol.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/static/app/js/dbcontrol.js b/app/static/app/js/dbcontrol.js index 51794dc..331327e 100644 --- a/app/static/app/js/dbcontrol.js +++ b/app/static/app/js/dbcontrol.js @@ -244,7 +244,7 @@ function filterEntriesByMonthYear(month, year) { const matchesMonth = month ? entryDate.getMonth() + 1 === month : true; // +1 da getMonth() 0-basiert ist if (entryDate.getMonth() + 1 >= 9){ - actualYear = actualYear - 1; + actualYear = actualYear - 0; } else { actualYear = actualYear; }; From cdc3c3c0e9b20fde92745b6d3caefd89942a480c Mon Sep 17 00:00:00 2001 From: Samuel Zielke Date: Tue, 1 Sep 2026 09:46:13 +0200 Subject: [PATCH 3/3] Fix: Speichern ohne Eintragen von Studnen. --- app/static/app/js/home01.js | 18 ++++++++++++------ app/templates/app/home.html | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/static/app/js/home01.js b/app/static/app/js/home01.js index a791f24..fb9df18 100644 --- a/app/static/app/js/home01.js +++ b/app/static/app/js/home01.js @@ -39,7 +39,13 @@ mins.addEventListener('input', () => { }) document.getElementById('sonstigesInput').addEventListener('input', () => { checkInput(); -}) +}) + +// Button-Status beim Öffnen des Modals einmal anhand der Standardwerte (z.B. Minuten = 0) setzen, +// da sonst ohne ein tatsächliches 'input'-Event der Button trotz gültiger Vorbelegung deaktiviert bleibt +document.getElementById('newEntryModal').addEventListener('show.bs.modal', () => { + checkInput(); +}) // Einstellungen wenn Neuer Eintrag erstellt wird NewEntryButton.addEventListener('click', () => { @@ -58,8 +64,8 @@ NewEntryButton.addEventListener('click', () => { sonstigesText.style.display = 'none'; } - // Berechnen der Duration - const duration = (parseInt(hours.value)*60) + parseInt(mins.value) + // Berechnen der Duration (Stunden sind optional -> ohne Eingabe wird 0 gespeichert) + const duration = ((parseInt(hours.value) || 0)*60) + parseInt(mins.value) const newEntryData = { date: document.getElementById('datum').value, @@ -326,7 +332,7 @@ document.getElementById('editEntrySubmitButton').addEventListener('click', () => updateEntry(parseInt(ToEditID), 'hours', { date: document.getElementById('editDatum').value, - duration: (parseInt(edithours.value)*60) + parseInt(editMins.value), + duration: ((parseInt(edithours.value) || 0)*60) + parseInt(editMins.value), type: type, status: 1, sondertext: document.getElementById('editsonstigesInput').value, @@ -438,7 +444,7 @@ function checkInput() { if ((sonstigesCheck.checked && sonstigesInput.value !== "") || !(sonstigesCheck.checked)) { // Debug Ausgabe für Bedingungsstufen // console.log("Erste Bedingung: TRUE") - if (hours.value && mins.value) { + if (mins.value) { // Stunden sind optional, Minuten bleiben Pflicht // Debug Ausgabe für Bedingungsstufen // console.log("Zweite Bedingung: TRUE") if (!allowToSend) { @@ -478,7 +484,7 @@ function checkEditInput() { if ((editsonstigesCheck.checked && editsonstigesInput.value !== "") || !(editsonstigesCheck.checked)) { // Debug Ausgabe für Bedingungsstufen // console.log("Erste Bedingung: TRUE") - if (edithours.value && editMins.value) { + if (editMins.value) { // Stunden sind optional, Minuten bleiben Pflicht // Debug Ausgabe für Bedingungsstufen // console.log("Zweite Bedingung: TRUE") if (!editallowToSend) { diff --git a/app/templates/app/home.html b/app/templates/app/home.html index 70bd8b2..abe4f4d 100644 --- a/app/templates/app/home.html +++ b/app/templates/app/home.html @@ -148,7 +148,7 @@

Dauer

- +
h
@@ -215,7 +215,7 @@

Dauer

- +
h