From b6c8ca1df17f86b881e4fbdacdc6ae656e614e9b Mon Sep 17 00:00:00 2001 From: Carsten Graf Date: Thu, 12 Feb 2026 11:44:09 +0100 Subject: [PATCH] Neue Version in den Header --- public/css/style.css | 14 ++++++++++++++ routes/verwaltung-routes.js | 4 ++++ views/verwaltung.ejs | 3 +++ 3 files changed, 21 insertions(+) diff --git a/public/css/style.css b/public/css/style.css index b6312b2..5c7f43f 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -976,6 +976,20 @@ table input[type="text"] { margin-bottom: 10px; } +.employee-new-version-warning { + display: inline-block; + margin-left: 10px; + padding: 2px 8px; + font-size: 12px; + font-weight: 700; + color: #e74c3c; + background-color: #fee; + border: 1px solid #e74c3c; + border-radius: 999px; + vertical-align: middle; + line-height: 1.6; +} + .employee-details { font-size: 14px; color: #666; diff --git a/routes/verwaltung-routes.js b/routes/verwaltung-routes.js index cc7111e..c167e8f 100644 --- a/routes/verwaltung-routes.js +++ b/routes/verwaltung-routes.js @@ -104,9 +104,13 @@ function registerVerwaltungRoutes(app) { const sortedWeeks = Object.values(employee.weeks).sort((a, b) => { return new Date(b.week_start) - new Date(a.week_start); }); + + // Flag: Gibt es in irgendeiner Woche eine neue Version nach Download? + const hasNewVersionAfterDownload = sortedWeeks.some(w => w.has_new_version_after_download); return { ...employee, + has_new_version_after_download: hasNewVersionAfterDownload, weeks: sortedWeeks }; }).sort((a, b) => { diff --git a/views/verwaltung.ejs b/views/verwaltung.ejs index 4465fce..47b82a2 100644 --- a/views/verwaltung.ejs +++ b/views/verwaltung.ejs @@ -85,6 +85,9 @@ <% if (employee.user.personalnummer) { %> (Personalnummer: <%= employee.user.personalnummer %>) <% } %> + <% if (employee.has_new_version_after_download) { %> + ACHTUNG: Neue version eingereicht + <% } %>