Enhance frontend components by importing API_BASE_URL for consistent API endpoint usage. This update improves code maintainability and prepares the components for future API integrations.

This commit is contained in:
Torsten Schulz (local)
2025-11-13 15:18:28 +01:00
parent e71988e0b7
commit 6cc8903e06
4 changed files with 12 additions and 0 deletions

View File

@@ -500,6 +500,8 @@ class TimeEntryService {
// Berechne Überstunden für die aktuelle Woche
const weekData = await this.getWeekOverview(uid, 0);
console.log(`🔍 Wochenüberstunden-Berechnung START: userDailyHours=${userDailyHours}`);
let weekSollMinutes = 0; // Soll-Arbeitszeit für die Woche
let weekIstMinutes = 0; // Ist-Arbeitszeit für die Woche
@@ -584,13 +586,17 @@ class TimeEntryService {
});
let daySollHours = userDailyHours; // Fallback: User's daily_hours
console.log(` Tag ${day.date}: userDailyHours=${userDailyHours}, applicableTimewish=${applicableTimewish ? applicableTimewish.hours + 'h' : 'keine'}`);
if (applicableTimewish && applicableTimewish.wishtype === 2 && applicableTimewish.hours) {
daySollHours = applicableTimewish.hours;
console.log(` → Verwende Timewish: ${daySollHours}h`);
}
// Bei halbem Urlaubstag: Soll halbiert
if (day.vacation && day.vacation.halfDay) {
daySollHours = daySollHours / 2;
console.log(` → Halber Urlaubstag: ${daySollHours}h`);
}
weekSollMinutes += daySollHours * 60;