Commit Graph
30 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 7b53618921 fix(state): surface localStorage save failures instead of silent loss (#4)
saveState now logs a console.warn on failure and alerts the user once per
session (storage full/unavailable) so they can export their data and avoid
silent data loss.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:21:23 +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 e851bb2833 fix(calendar): preserve manual picks when regenerating a month (#2)
generatePlan gains a preAssigned parameter: manual entries occupy slots,
count toward eligibility (maxPerMonth/minGap) and are never double-booked;
only the remaining slots per day are auto-filled. The generate handler now
keeps manual:true entries for the month instead of wiping them.

Adds tests for slot occupation, fully-manual days, and maxPerMonth counting.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:17:22 +00:00
ferdi2goandClaude Opus 4.8 700ec6de1c fix(calendar): use dynamic year range instead of hardcoded 2026 (#1)
currentYear now initializes to the current year and the year selector
offers a rolling range (this year -1 to +2) so plans can be created
for years other than 2026.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:12:18 +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 294de5276b feat(history): sort by date desc + name asc, delete single entry 2026-04-28 11:37:31 +00:00
ferdi2go 078d74f09f feat(calendar): pass slotsPerDay to generator, show skipped-dates warning 2026-04-28 11:26:53 +00:00
ferdi2go fa28640c28 feat(calendar): N moderator slots per day with disable-on-duplicate 2026-04-28 11:17:08 +00:00
ferdi2go 3b84fce1e6 feat(calendar): add 'Pro Tag' moderator-count selector 2026-04-28 11:09:42 +00:00
ferdi2go 69e424519d feat(excel): group entries by date, join names with ' & ' 2026-04-28 11:03:05 +00:00
ferdi2go ad680ae1f6 feat: state.settings.moderatorsPerDay with localStorage persistence 2026-04-28 10:48:58 +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
ferdi2go 3d314e84fd feat(algo): skip day when candidates < slotsPerDay 2026-04-28 10:07:22 +00:00
ferdi2go 625f9c7037 feat(algo): slotsPerDay parameter for top-N selection 2026-04-28 09:59:44 +00:00
ferdi2go 790ea72987 refactor: generatePlan returns {assignments, skippedDates} 2026-04-28 09:55:25 +00:00
ferdi2goandClaude Opus 4.7 e4ae866375 chore: ui polish — extract inline styles to CSS classes, add header art
- Move inline style.cssText to semantic classes (cal-legend, cal-header-cell,
  cal-day-tag-label, cal-btn-row) in calendar.js
- Buttons "FT"/"BU" → "Feiertag"/"Betriebsurl." for clarity
- Decorative turntable/mixer SVG header art in index.html
- style.css build-out for the new classes
- Initial README content
- Dev port 3000 → 3001

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 09:43:53 +00:00
Ferdinand dca82fe381 feat: auto-persist state to localStorage on every change 2026-04-08 14:17:24 +02:00
Ferdinand b9fb08299e fix: wire year selector and fix shallow copy in loadPlanFromHistory 2026-04-08 13:25:36 +02:00
Ferdinand bcdba20e09 feat: data tab with JSON load/save and history management 2026-04-08 13:22:48 +02:00
Ferdinand d6b013132a refactor: use removeHistoryEntry API and remove unnecessary spread in calendar 2026-04-08 13:22:08 +02:00
Ferdinand d65758ed91 feat: calendar tab with plan generation, holiday marking and manual override 2026-04-08 13:21:00 +02:00
Ferdinand d61dcbe6b2 feat: employees tab with constraint editor (DOM-based, XSS-safe) 2026-04-08 13:18:48 +02:00
Ferdinand 72a2af3a74 feat: Excel import/export module via SheetJS 2026-04-08 13:17:12 +02:00
FerdinandandClaude Sonnet 4.6 b5cfe5b336 feat: algorithm module with unit tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 13:10:49 +02: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
Ferdinand f306c634d5 feat: project scaffold with tabs, styles and package.json 2026-04-08 10:40:32 +02:00