Commit Graph
12 Commits
Author SHA1 Message Date
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
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 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 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