minor changes to /generate-pdf api

This commit is contained in:
Mateo Körber Belmonte
2025-02-25 17:44:23 +01:00
parent 05af907a64
commit 08c0bc6826
3 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -53,7 +53,7 @@
<div class="bottom-controls">
<button onclick="saveWeek()">Woche speichern</button>
<button onclick="generatePDF()">PDF generieren</button>
<button onclick="generatePDF('week')">PDF generieren</button>
</div>
</div>
+2 -2
View File
@@ -224,7 +224,7 @@ function loadWeekData(week) {
});
}
function generatePDF() {
function generatePDF(type) {
const weekNumber = getWeekNumber(currentWeek);
const year = currentWeek.getFullYear();
const week = `KW${weekNumber}-${year}`;
@@ -234,7 +234,7 @@ function generatePDF() {
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ week })
body: JSON.stringify({ week, type })
})
.then(response => response.json())
.then(data => {