Commit graph

7 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
09ef077b67 Update test expectations for 2.0 deduction
Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com>
2025-12-12 11:39:47 +00:00
copilot-swe-agent[bot]
d6372fe2e2 Change weekend deduction from 1.0 to 2.0 units
Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com>
2025-12-12 11:36:24 +00:00
copilot-swe-agent[bot]
635b986e2c Add Bonus-Bericht export function for formatted bonus reports
- Added new "Bonus-Bericht" button to both Dienstplan_Portable.html and webapp
- Creates a printable HTML report with:
  - Header with "Bonuszahlungen" title
  - Month and payout date information
  - Table showing duties per weekday with amounts per employee
  - Individual explanatory notes for each employee
  - Print/PDF save button
- Format matches user's requested output style from issue #20

Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com>
2025-12-11 08:52:09 +00:00
copilot-swe-agent[bot]
5c9ab77ffd Add Excel/CSV export feature for beginner-friendly data export
- Add CSV export button to Dienstplan_Portable.html
- Add CSV export button to webapp (index.html, app.js, styles.css)
- Export includes all duties and monthly summary with calculations
- Use semicolon separator for German Excel compatibility
- Add UTF-8 BOM for proper character encoding
- Add proper CSV escaping for names with special characters
- Add helpful tip explaining CSV compatibility with Excel/LibreOffice/Google Sheets

Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com>
2025-12-11 08:23:39 +00:00
Claude
736d160586
Korrektur: Bonus nur bei WE-Schwelle ≥ 2,0
- 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
2025-11-18 22:02:48 +00:00
Claude
116a8851bf
Add comprehensive automated test suite for web app
Implements complete test coverage for the duty schedule calculator:

Test Coverage:
- Holiday Provider: NRW holiday detection (2025-2030)
- Calculator - Day Classification: Qualifying days (Fr-So, holidays, day before)
- Calculator - Bonus Calculation: All scenarios (threshold, mixed days, half shifts)
- Storage: CRUD operations, export/import, data persistence
- Edge Cases: Rounding errors, performance, leap years

Test Statistics:
- Total Tests: 30+
- Categories: 5 (HolidayProvider, Calculator×2, Storage, Edge Cases)
- Assertions: assertEqual, assertAlmostEqual, assertTrue, assertFalse

Features:
- Visual test runner with color-coded results
- Detailed error messages with expected vs. actual values
- Grouped test results by category
- Performance tracking
- Summary statistics (total/passed/failed)

Test Scenarios Include:
- Threshold: <2.0 days (0€), =2.0 days (450€), >2.0 days (900€)
- Mixed duties: Normal + qualifying days
- Half shifts: Correct calculation (0.5 × rates)
- Holidays: Including day before holiday
- Storage: Multiple employees, data persistence
- Edge cases: Rounding, 30+ duties, leap year

Files:
- webapp/test.html - Test runner UI
- webapp/test-suite.js - Test implementation (30+ tests)
- webapp/TEST_GUIDE.md - Comprehensive testing documentation

Usage:
1. Open http://localhost:8000/test.html
2. Click "Alle Tests ausführen"
3. View results with pass/fail indicators

All tests passing 
2025-11-18 20:13:32 +00:00
Claude
520e3b62e0
Add web-based duty schedule bonus calculator
Implements a complete web application for calculating bonus payments
for weekend and holiday duty shifts according to NRW rules.

Features:
- Employee management (add/remove multiple employees)
- Monthly duty scheduling (full and half shifts)
- Automatic NRW holiday detection (2025-2030)
- Bonus calculation with configurable rules
- LocalStorage for data persistence
- Export/Import functionality (JSON)
- Responsive design for desktop and mobile
- No external dependencies

Calculation Rules:
- Qualifying days: Friday, Saturday, Sunday, public holidays, day before holiday
- Minimum threshold: 2.0 qualifying days required
- Deduction: 1.0 qualifying day after threshold reached
- Rates: Normal days 250€, qualifying days 450€
- Half shifts: 50% of respective rate
- No bonus payment if threshold not reached

Technical Stack:
- Vanilla JavaScript (no frameworks)
- HTML5 & CSS3
- LocalStorage API
- Modern, gradient-based UI design

Files:
- webapp/index.html - Main HTML interface
- webapp/styles.css - Responsive styling
- webapp/app.js - Main application logic and UI handling
- webapp/calculator.js - Bonus calculation engine
- webapp/holidays.js - NRW public holidays provider
- webapp/storage.js - LocalStorage data management
- webapp/README.md - Comprehensive documentation

Updated main README.md to include web app in available versions.
2025-11-18 20:00:13 +00:00