diff --git a/public/css/style.css b/public/css/style.css index 28b4fa1..670fd94 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -38,6 +38,18 @@ body { padding: 15px 30px; } +.navbar-brand { + display: flex; + align-items: center; + gap: 25px; +} + +.navbar-logo { + height: 40px; + width: auto; + object-fit: contain; +} + .navbar h1 { font-size: 24px; margin: 0; diff --git a/public/images/header.png b/public/images/header.png new file mode 100644 index 0000000..fdc241b Binary files /dev/null and b/public/images/header.png differ diff --git a/services/pdf-service.js b/services/pdf-service.js index b8b7b15..981814f 100644 --- a/services/pdf-service.js +++ b/services/pdf-service.js @@ -251,12 +251,13 @@ function generatePDF(timesheetId, req, res) { doc.moveTo(50, y).lineTo(550, y).stroke(); doc.moveDown(0.5); doc.font('Helvetica-Bold'); - doc.text(`Gesamtstunden: ${totalHours.toFixed(2)} h`, 50, doc.y); + // Gesamtstunden = Arbeitsstunden + Urlaubsstunden (Urlaub zählt als Arbeitszeit) + const totalHoursWithVacation = totalHours + vacationHours; + doc.text(`Gesamtstunden: ${totalHoursWithVacation.toFixed(2)} h`, 50, doc.y); // Überstunden berechnen und anzeigen const wochenstunden = timesheet.wochenstunden || 0; // Überstunden = (Tatsächliche Stunden + Urlaubsstunden) - Wochenstunden - const totalHoursWithVacation = totalHours + vacationHours; const overtimeHours = totalHoursWithVacation - wochenstunden; doc.moveDown(0.3); @@ -467,11 +468,12 @@ function generatePDFToBuffer(timesheetId, req) { doc.moveTo(50, y).lineTo(550, y).stroke(); doc.moveDown(0.5); doc.font('Helvetica-Bold'); - doc.text(`Gesamtstunden: ${totalHours.toFixed(2)} h`, 50, doc.y); + // Gesamtstunden = Arbeitsstunden + Urlaubsstunden (Urlaub zählt als Arbeitszeit) + const totalHoursWithVacation = totalHours + vacationHours; + doc.text(`Gesamtstunden: ${totalHoursWithVacation.toFixed(2)} h`, 50, doc.y); const wochenstunden = timesheet.wochenstunden || 0; // Überstunden = (Tatsächliche Stunden + Urlaubsstunden) - Wochenstunden - const totalHoursWithVacation = totalHours + vacationHours; const overtimeHours = totalHoursWithVacation - wochenstunden; doc.moveDown(0.3); diff --git a/views/admin.ejs b/views/admin.ejs index 8f541ca..ed7533a 100644 --- a/views/admin.ejs +++ b/views/admin.ejs @@ -9,7 +9,10 @@