Remove debug logging from TimeEntryService to streamline code and enhance performance. This update improves readability by eliminating unnecessary console outputs while maintaining the functionality of time calculations.

This commit is contained in:
Torsten Schulz (local)
2025-10-20 11:50:37 +02:00
parent dfd169c78d
commit 1eff170a7b

View File

@@ -479,8 +479,6 @@ class TimeEntryService {
const missingBreakMinutes = Math.max(0, requiredBreakMinutes - alreadyTakenBreakMinutes); const missingBreakMinutes = Math.max(0, requiredBreakMinutes - alreadyTakenBreakMinutes);
// Addiere fehlende Pausen zur "Offen" Zeit // Addiere fehlende Pausen zur "Offen" Zeit
console.log(`🔍 Offen Berechnung: currentlyWorked=${currentlyWorked}, open (vor Pause)=${open}, missingBreakMinutes=${missingBreakMinutes}`);
if (open && open !== '—' && open !== 'Arbeitsende erreicht') { if (open && open !== '—' && open !== 'Arbeitsende erreicht') {
const openParts = open.split(':'); const openParts = open.split(':');
const openH = parseInt(openParts[0]); const openH = parseInt(openParts[0]);
@@ -492,8 +490,6 @@ class TimeEntryService {
const newOpenM = openMinutes % 60; const newOpenM = openMinutes % 60;
const newOpenS = openS; const newOpenS = openS;
console.log(`🔍 Offen Berechnung: open (nach Pause)=${newOpenH}:${newOpenM.toString().padStart(2, '0')}:${newOpenS.toString().padStart(2, '0')}`);
open = `${newOpenH.toString().padStart(2, '0')}:${newOpenM.toString().padStart(2, '0')}:${newOpenS.toString().padStart(2, '0')}`; open = `${newOpenH.toString().padStart(2, '0')}:${newOpenM.toString().padStart(2, '0')}:${newOpenS.toString().padStart(2, '0')}`;
} }
@@ -743,8 +739,6 @@ class TimeEntryService {
const generalOvertimeMinutes = totalOvertimeResult.minutes || 0; const generalOvertimeMinutes = totalOvertimeResult.minutes || 0;
const generalRemainingMinutes = openMinutes - generalOvertimeMinutes; const generalRemainingMinutes = openMinutes - generalOvertimeMinutes;
console.log(`🔍 Bereinigtes Arbeitsende - Generell: openMinutes=${openMinutes}, overtimeMinutes=${generalOvertimeMinutes}, remaining=${generalRemainingMinutes}`);
if (generalRemainingMinutes <= 0) { if (generalRemainingMinutes <= 0) {
adjustedEndTodayGeneral = 'Arbeitsende erreicht'; adjustedEndTodayGeneral = 'Arbeitsende erreicht';
} else { } else {
@@ -761,8 +755,6 @@ class TimeEntryService {
const weekOvertimeMinutes = overtimeMinutes; // Bereits berechnet const weekOvertimeMinutes = overtimeMinutes; // Bereits berechnet
const weekRemainingMinutes = openMinutes - weekOvertimeMinutes; const weekRemainingMinutes = openMinutes - weekOvertimeMinutes;
console.log(`🔍 Bereinigtes Arbeitsende - Woche: openMinutes=${openMinutes}, overtimeMinutes=${weekOvertimeMinutes}, remaining=${weekRemainingMinutes}`);
if (weekRemainingMinutes <= 0) { if (weekRemainingMinutes <= 0) {
adjustedEndTodayWeek = 'Arbeitsende erreicht'; adjustedEndTodayWeek = 'Arbeitsende erreicht';
} else { } else {