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