Refactor SQL scripts for index creation in sick and vacation tables; implement checks to prevent duplicate index creation and streamline execution process. Update TimeEntryService to remove obsolete overtime calculation method for cleaner code.

This commit is contained in:
Torsten Schulz (local)
2025-10-20 08:34:27 +02:00
parent 44fb9a0bdd
commit e7c2d54468
4 changed files with 80 additions and 13 deletions

View File

@@ -462,9 +462,6 @@ class TimeEntryService {
// Neue Berechnung: Timewish-basiert
const totalOvertimeResult = await this._calculateTotalOvertime(uid, runningEntry);
// Alte Berechnung: weekly_worktime-basiert (zum Vergleich)
const totalOvertimeOldStyleResult = await this._calculateTotalOvertimeOldStyle(uid, runningEntry);
// Berechne Überstunden für die aktuelle Woche
const weekData = await this.getWeekOverview(uid, 0);
@@ -783,7 +780,6 @@ class TimeEntryService {
regularEnd: null,
overtime: overtime, // Überstunden für die aktuelle Woche
totalOvertime: totalOvertimeResult.formatted, // Überstunden über den gesamten Zeitraum (timewish-basiert)
totalOvertimeOldStyle: totalOvertimeOldStyleResult.formatted, // Überstunden (weekly_worktime-basiert, zum Vergleich)
weekWorktime: weekWorktime,
nonWorkingHours: nonWorkingHoursFormatted,
openForWeek: openForWeekFormatted,