Styling
This commit is contained in:
@@ -24,7 +24,7 @@ body {
|
||||
|
||||
/* Navbar */
|
||||
.navbar {
|
||||
background-color: #2c3e50;
|
||||
background-color: #0066FF;
|
||||
color: white;
|
||||
padding: 15px 0;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
@@ -104,6 +104,15 @@ body {
|
||||
background-color: #7f8c8d;
|
||||
}
|
||||
|
||||
.btn-logout {
|
||||
background-color: #e74c3c;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-logout:hover {
|
||||
background-color: #c0392b;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-color: #27ae60;
|
||||
color: white;
|
||||
@@ -146,7 +155,7 @@ body {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
background: #0066FF;
|
||||
}
|
||||
|
||||
.login-box {
|
||||
@@ -310,7 +319,8 @@ body {
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
flex: 1;
|
||||
min-width: 0; /* Ermöglicht Flexbox-Shrinking */
|
||||
min-width: 0;
|
||||
/* Ermöglicht Flexbox-Shrinking */
|
||||
}
|
||||
|
||||
/* User Stats Panel */
|
||||
|
||||
@@ -210,25 +210,15 @@ function registerVerwaltungRoutes(app) {
|
||||
vacationDays += 0.5;
|
||||
vacationHours += 4; // Halber Tag = 4 Stunden
|
||||
// Bei halbem Tag Urlaub können noch Arbeitsstunden vorhanden sein
|
||||
// WICHTIG: total_hours enthält bereits Wochenend-Prozentsätze (aus timesheet.js)
|
||||
if (entry.total_hours) {
|
||||
let hours = entry.total_hours;
|
||||
// Wochenend-Prozentsatz anwenden (nur auf tatsächlich gearbeitete Stunden)
|
||||
const weekendPercentage = getWeekendPercentage(entry.date);
|
||||
if (weekendPercentage >= 100 && hours > 0 && !entry.sick_status) {
|
||||
hours = hours * (weekendPercentage / 100);
|
||||
}
|
||||
totalHours += hours;
|
||||
totalHours += parseFloat(entry.total_hours) || 0;
|
||||
}
|
||||
} else {
|
||||
// Kein Urlaub - zähle nur Arbeitsstunden
|
||||
// WICHTIG: total_hours enthält bereits Wochenend-Prozentsätze (aus timesheet.js)
|
||||
if (entry.total_hours) {
|
||||
let hours = entry.total_hours;
|
||||
// Wochenend-Prozentsatz anwenden (nur auf tatsächlich gearbeitete Stunden, nicht auf Krankheit)
|
||||
const weekendPercentage = getWeekendPercentage(entry.date);
|
||||
if (weekendPercentage > 0 && hours > 0 && !entry.sick_status) {
|
||||
hours = hours * (1 + weekendPercentage / 100);
|
||||
}
|
||||
totalHours += hours;
|
||||
totalHours += parseFloat(entry.total_hours) || 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<% }); %>
|
||||
</select>
|
||||
<% } %>
|
||||
<a href="/logout" class="btn btn-secondary">Abmelden</a>
|
||||
<a href="/logout" class="btn btn-logout">Abmelden</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<% }); %>
|
||||
</select>
|
||||
<% } %>
|
||||
<a href="/logout" class="btn btn-secondary">Abmelden</a>
|
||||
<a href="/logout" class="btn btn-logout">Abmelden</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -98,6 +98,12 @@
|
||||
font-weight: 600;
|
||||
color: #2c3e50;
|
||||
}
|
||||
.summary-value.overtime-positive {
|
||||
color: #27ae60 !important;
|
||||
}
|
||||
.summary-value.overtime-negative {
|
||||
color: #e74c3c !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -117,7 +123,7 @@
|
||||
<% }); %>
|
||||
</select>
|
||||
<% } %>
|
||||
<a href="/logout" class="btn btn-secondary">Abmelden</a>
|
||||
<a href="/logout" class="btn btn-logout">Abmelden</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -142,6 +148,10 @@
|
||||
<span class="summary-label">Verbleibend:</span>
|
||||
<span class="summary-value" id="remainingOvertime">-</span>
|
||||
</div>
|
||||
<div class="summary-item" id="offsetItem" style="display: none;">
|
||||
<span class="summary-label">Manuelle Korrektur (Verwaltung):</span>
|
||||
<span class="summary-value" id="overtimeOffset">-</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loading" class="loading">Lade Daten...</div>
|
||||
@@ -231,17 +241,38 @@
|
||||
totalOvertime += week.overtime_hours;
|
||||
totalOvertimeTaken += week.overtime_taken;
|
||||
});
|
||||
const remainingOvertime = totalOvertime - totalOvertimeTaken + (data.overtime_offset_hours || 0);
|
||||
const overtimeOffset = data.overtime_offset_hours || 0;
|
||||
const remainingOvertime = totalOvertime - totalOvertimeTaken + overtimeOffset;
|
||||
|
||||
// Zusammenfassung anzeigen
|
||||
document.getElementById('totalOvertime').textContent =
|
||||
const totalOvertimeEl = document.getElementById('totalOvertime');
|
||||
totalOvertimeEl.textContent =
|
||||
(totalOvertime >= 0 ? '+' : '') + totalOvertime.toFixed(2) + ' h';
|
||||
document.getElementById('totalOvertimeTaken').textContent =
|
||||
totalOvertimeEl.className =
|
||||
'summary-value ' + (totalOvertime >= 0 ? 'overtime-positive' : 'overtime-negative');
|
||||
|
||||
const totalOvertimeTakenEl = document.getElementById('totalOvertimeTaken');
|
||||
totalOvertimeTakenEl.textContent =
|
||||
totalOvertimeTaken.toFixed(2) + ' h';
|
||||
document.getElementById('remainingOvertime').textContent =
|
||||
totalOvertimeTakenEl.className = 'summary-value overtime-positive';
|
||||
|
||||
const remainingOvertimeEl = document.getElementById('remainingOvertime');
|
||||
remainingOvertimeEl.textContent =
|
||||
(remainingOvertime >= 0 ? '+' : '') + remainingOvertime.toFixed(2) + ' h';
|
||||
document.getElementById('remainingOvertime').className =
|
||||
remainingOvertimeEl.className =
|
||||
'summary-value ' + (remainingOvertime >= 0 ? 'overtime-positive' : 'overtime-negative');
|
||||
|
||||
// Manuelle Korrektur anzeigen (nur wenn vorhanden)
|
||||
const offsetItem = document.getElementById('offsetItem');
|
||||
const offsetValue = document.getElementById('overtimeOffset');
|
||||
if (overtimeOffset !== 0) {
|
||||
offsetValue.textContent = (overtimeOffset >= 0 ? '+' : '') + overtimeOffset.toFixed(2) + ' h';
|
||||
offsetValue.className = 'summary-value ' + (overtimeOffset >= 0 ? 'overtime-positive' : 'overtime-negative');
|
||||
offsetItem.style.display = 'flex';
|
||||
} else {
|
||||
offsetItem.style.display = 'none';
|
||||
}
|
||||
|
||||
summaryBoxEl.style.display = 'block';
|
||||
|
||||
// Tabelle füllen
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<% }); %>
|
||||
</select>
|
||||
<% } %>
|
||||
<a href="/logout" class="btn btn-secondary">Abmelden</a>
|
||||
<a href="/logout" class="btn btn-logout">Abmelden</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user