Commit Graph
8 Commits
Author SHA1 Message Date
ferdi2goandClaude Opus 4.8 142e0efa1f fix(employees): remove history entries when deleting an employee (#5)
removeEmployee now also filters the deleted employee's history entries, so
no orphaned "(unbekannt)" rows remain. Adds a test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:29:16 +00:00
ferdi2goandClaude Opus 4.8 065876ced4 fix(import): validate/normalize imported data, guard Excel I/O (#3)
- loadFromJSON and the localStorage startup load now run employees through
  normalizeEmployees(): fills missing constraints, drops unusable rows,
  de-duplicates ids, and discards invalid vacation ranges — preventing
  later crashes (e.g. c.neverDays on undefined) and same-day double-books.
- Excel import is wrapped in try/catch with a typeof XLSX guard and user
  feedback; the Excel export button gets the same guard.
- createEmployee reuses the shared defaultConstraints() factory.

Adds normalizeEmployees tests (defaults, dropping, dedup, vacations) and a
loadFromJSON normalization test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:20:41 +00:00
ferdi2goandClaude Opus 4.8 6736021af1 feat(employees): default minGapDays to 14, robust ID fallback
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:11:36 +00:00
ferdi2go a825a63961 feat(data): settings.moderatorsPerDay in load/save JSON 2026-04-28 10:38:51 +00:00
ferdi2go 7bda92a0a3 feat(data): removeHistoryEntry supports optional employeeId 2026-04-28 10:31:38 +00:00
ferdi2go 23683102bc feat(data): dedupe history by (date, employeeId) 2026-04-28 10:21:18 +00:00
Ferdinand b0dfd1f716 fix: add error handling, empty name guard, and input validation to data module 2026-04-08 13:03:54 +02:00
Ferdinand 0a1f30553a feat: data module with JSON load/save and employee CRUD 2026-04-08 10:42:53 +02:00