This commit enhances error handling across the codebase with clear, user-friendly error messages:
Python Files:
- main.py: Added error handling for directory creation and file operations
- read_excel.py: Added error handling for file loading, JSON parsing, and data output
- fill_plan_dates.py: Added input validation and error handling for file operations and date calculations
- calculate.py: Improved error handling in load_holidays() and process_file() with detailed warnings for invalid data
- build_template.py: Added error handling for directory creation, workbook creation, and file saving
JavaScript Files:
- storage.js: Added comprehensive error handling for:
- JSON parsing in getEmployees() and getAllDuties()
- Type validation in save operations
- Date conversion in getDutiesForMonth()
- Data validation in saveDutiesForMonth()
- Export/import operations
Benefits:
- Clear error messages in German for better user experience
- Graceful degradation when data is corrupted
- Type checking to prevent invalid data from being stored
- Row-level error reporting for Excel processing
- Invalid data filtering to prevent application crashes
This fixes the issue where:
- December 24 was not recognized as a special day
- December 23 was not marked as Vortag (pre-holiday day)
By adding Heiligabend to the holiday list:
- Dec 24 is now Ist_FEIERTAG=TRUE (treated as WE-Tag)
- Dec 23 is now Ist_VORTAG=TRUE (day before holiday, also WE-Tag)
Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com>
- Gesamter Bonus (WT + WE) wird nur gezahlt, wenn >= 2,0 WE-Tage erreicht
- Unter Schwelle: Auszahlung = 0€ (weder WT noch WE)
- Abzug mit Freitag-Priorität implementiert
- Testfälle und Dokumentation aktualisiert
Betrifft:
- webapp/calculator.js: Korrekte Berechnung mit Freitag-Priorität
- src/calculate.py: WT-Auszahlung nur bei Schwelle
- SPECIFICATION.md: Regeln, Testfälle und Changelog aktualisiert
- Neue vereinfachte Vorlage ohne komplexe Excel-Formeln
- Automatische Anteil-Berechnung (1 MA = 1.0, 2 MA = je 0.5)
- Python-basierte Vergütungsberechnung nach NRW-Regeln
- Datumsformat als Text für bessere Kompatibilität
- Testdaten-Generator mit Splits