Neue Version in den Header
This commit is contained in:
@@ -976,6 +976,20 @@ table input[type="text"] {
|
|||||||
margin-bottom: 10px;
|
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 {
|
.employee-details {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|||||||
@@ -104,9 +104,13 @@ function registerVerwaltungRoutes(app) {
|
|||||||
const sortedWeeks = Object.values(employee.weeks).sort((a, b) => {
|
const sortedWeeks = Object.values(employee.weeks).sort((a, b) => {
|
||||||
return new Date(b.week_start) - new Date(a.week_start);
|
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 {
|
return {
|
||||||
...employee,
|
...employee,
|
||||||
|
has_new_version_after_download: hasNewVersionAfterDownload,
|
||||||
weeks: sortedWeeks
|
weeks: sortedWeeks
|
||||||
};
|
};
|
||||||
}).sort((a, b) => {
|
}).sort((a, b) => {
|
||||||
|
|||||||
@@ -85,6 +85,9 @@
|
|||||||
<% if (employee.user.personalnummer) { %>
|
<% if (employee.user.personalnummer) { %>
|
||||||
<span style="margin-left: 10px; color: #666;">(Personalnummer: <%= employee.user.personalnummer %>)</span>
|
<span style="margin-left: 10px; color: #666;">(Personalnummer: <%= employee.user.personalnummer %>)</span>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% if (employee.has_new_version_after_download) { %>
|
||||||
|
<span class="employee-new-version-warning">ACHTUNG: Neue version eingereicht</span>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<div class="employee-details" style="margin-top: 10px;">
|
<div class="employee-details" style="margin-top: 10px;">
|
||||||
<div style="display: inline-block; margin-right: 20px;">
|
<div style="display: inline-block; margin-right: 20px;">
|
||||||
|
|||||||
Reference in New Issue
Block a user