Implementierung Datenbank pflege wegen doppelten einträgen
This commit is contained in:
@@ -441,6 +441,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="options-section" style="margin-top: 40px;">
|
||||
<div class="collapsible-header" onclick="toggleTimesheetMaintenanceSection()" style="cursor: pointer; padding: 15px; background-color: #f5f5f5; border: 1px solid #ddd; border-radius: 4px; display: flex; justify-content: space-between; align-items: center;">
|
||||
<h2 style="margin: 0;">Datenbankpflege – doppelte Timesheet-Einträge</h2>
|
||||
<span id="timesheetMaintenanceToggleIcon" style="font-size: 18px; transition: transform 0.3s;">▼</span>
|
||||
</div>
|
||||
|
||||
<div id="timesheetMaintenanceContent" style="display: none; padding: 20px; border: 1px solid #ddd; border-top: none; border-radius: 0 0 4px 4px; background-color: #fff;">
|
||||
<p style="margin-bottom: 15px; color: #666;">
|
||||
Es werden alle Tage angezeigt, an denen ein Mitarbeiter mehr als einen Eintrag in der Tabelle <code>timesheet_entries</code> hat
|
||||
(Schlüssel: Benutzer + Datum). Über diese Übersicht können Sie fehlerhafte Einträge gezielt löschen.
|
||||
</p>
|
||||
<button id="loadTimesheetDuplicatesBtn" class="btn btn-secondary" type="button" style="margin-bottom: 15px;">
|
||||
Timesheet-Duplikate laden
|
||||
</button>
|
||||
<div id="timesheetDuplicatesContainer">
|
||||
<p style="color: #888;">Noch keine Daten geladen. Klicken Sie auf „Timesheet-Duplikate laden“, um die Übersicht anzuzeigen.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -515,6 +535,20 @@
|
||||
icon.style.transform = 'rotate(0deg)';
|
||||
}
|
||||
}
|
||||
|
||||
function toggleTimesheetMaintenanceSection() {
|
||||
const content = document.getElementById('timesheetMaintenanceContent');
|
||||
const icon = document.getElementById('timesheetMaintenanceToggleIcon');
|
||||
if (!content) return;
|
||||
|
||||
if (content.style.display === 'none' || content.style.display === '') {
|
||||
content.style.display = 'block';
|
||||
if (icon) icon.style.transform = 'rotate(180deg)';
|
||||
} else {
|
||||
content.style.display = 'none';
|
||||
if (icon) icon.style.transform = 'rotate(0deg)';
|
||||
}
|
||||
}
|
||||
|
||||
// Rollenwechsel-Handler
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
Reference in New Issue
Block a user