Commit Graph

13 Commits

Author SHA1 Message Date
Docker Config Backup
c220956146 feat: month Excel FPD column matches the web FPD check for N and O
Restores the rule from 707e18c: a working-day N or O is credited as a
worked day (8 h) in the FPD column of the Excel exported by the
"Excel" button, the same as the web FPD check. Reverts e2da33b.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-22 09:42:16 +02:00
Docker Config Backup
e2da33bc44 revert: month Excel FPD column counts N/O as 0 h again
The Excel FPD column is meant to differ from the web FPD check; only
O should behave like N, which it already did. Keeps the D-like colour
for O.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-22 09:36:18 +02:00
Docker Config Backup
575164d8a1 fix: name is Kopáček Ondřej (second correction)
Rename Kópáček → Kopáček in default data, both Excel templates and the
export rosters; the server fix-up map now maps both earlier spellings
to the correct one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-22 09:34:41 +02:00
Docker Config Backup
707e18c625 fix: correct name to Kópáček Ondřej; O (otcovská) looks like D, counts like N
The new worker's surname was misheard: Kropáček → Kópáček everywhere
(default data, both Excel templates, export rosters). The person id
tkb-kropacek is kept. The server now normalises the name in stored
files at startup and in every incoming save, so clients that still
hold the old name cannot write it back.

"O" (otcovská dovolená) is now rendered in the same yellow as "D" in
the app and the month Excel, labelled "Otcovská dovolená", and for the
FPD balance a working-day O is credited like N (a normal worked day)
both in the web FPD check and in the month Excel's FPD column, which
previously counted N and O as zero and disagreed with the web.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-22 09:28:48 +02:00
Docker Config Backup
09a07b510b feat: auto-save drafts + publish step for viewers
Editors' changes are now auto-saved (5 s after the last edit, at most
30 s after the first unsaved one, retried on failure) with a status
indicator; leaving the page with unsaved changes prompts a warning.

Each schedule file keeps a published snapshot next to the draft.
Viewer/cis roles load and export only the published snapshot; the
editor's draft becomes visible to them only after "Publikovat".
Toolbar shows the publish state ("Nepublikované změny" / "Publikováno
HH:MM"), the file manager shows the publish date, and viewers pick up a
new publish automatically within a minute.

Server: GET /api/files/:id?view=published, POST /api/files/:id/publish,
?view=published on all exports, one-time migration that seeds the
published snapshot from the current data on startup.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-17 13:12:49 +02:00
Docker Config Backup
3d306e641c feat: add Kropáček Ondřej + May–Jul feature work (half-cell marks, copy/paste, exports, roles)
New worker: Kropáček Ondřej (TKB, part-time student) inserted between
Dvořák Václav and Vondrák Pavel in data.json, the full-month Excel
template (new row 13, everything below shifted) and the docházka
template (13 person rows). Not added to the harmonogram/CIS roster —
he has no CIS personal number.

Also checkpoints the uncommitted work deployed to production between
May and July 2026:
- half-cell day/night preference marks (color + text per half)
- cell copy/paste (Ctrl+C/V, context menu), incl. from info rows
- light/dark theme toggle, TKB people filter, 162 filter
- full-month Excel export (template) and harmonogram export for CIS
- docházka export: half-time workers, retired flag, contractor handling
- third login role "cis" (viewer + export access)
- retired flag hides a person from UI/FPD while keeping past data

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-17 13:02:52 +02:00
Docker Config Backup
131b0d0df1 chore: add deploy-tkb.sh
Mirrors the rsync workflow I've been running by hand. Patches the production
<title> to "Tunely" (local index.html keeps "Tunely-DEV" so dev tabs are
distinguishable) and restarts the tkb-plan pm2 process.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:24:52 +02:00
Docker Config Backup
c3eda37f65 fix(dev): vite proxy → port 3090
The TKB server runs on 3090; the proxy was still pointed at 3080 from the
METRO project origin, so the dev server returned the wrong schema (stations
instead of people).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:22:37 +02:00
Docker Config Backup
db56403f7c feat: dochazka Excel export + auto-reload + 162 filter
- Add dochazka Excel export using direct ZIP/XML manipulation of template
  (preserves styles.xml byte-for-byte to avoid Excel "repaired styles" warning)
- Calculate per-person stravné doplatek, transport (AUV), and indiv1
  (closure count + Janouš internet) per sichtovnice.py logic
- Filter exported people to TEMPLATE_NAMES (12 fixed template rows)
- Add server version polling + auto-reload on deploy
- Add FPD check modal for monthly hour validation
- Add "162" filter button to hide first 5 TKB people from view

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:39:04 +02:00
Docker Config Backup
3cd05ce0e2 feat: Práce mimo směnu column + right-click menu on PMS cells
- Added PMS summary column after each month's last day
- Merged header cell with rotated "Práce mimo směnu" label spanning
  DEN through D8 rows (no internal borders, overflow hidden)
- PMS cells in person rows are editable (click/double-click)
- Right-click context menu works on PMS cells (value, color, comments)
- PMS values stored as negative month keys in person data
- Dynamic height adjustment when info rows toggled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 12:18:40 +02:00
Docker Config Backup
785966463c feat: SAZLT info row, 16/24h shifts, VN/NN font colors
- Added SAZLT info row (between TKB and Metro) with toggle
- Added 16h and 24h shift codes (progressive green shades)
- VN people get red font color on A/B shifts
- NN people get blue font color on A/B shifts
- Changed B (Noční) background to light blue-gray for readability

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:49:30 +02:00
Docker Config Backup
177975c70c milestone: MVP — stable layout, all core features working
Reverted sticky header attempt back to clean two-column layout.
Server now sends no-cache headers for all static files.

Working features:
- People grid (18 TKB + 5 IT) with year-long calendar
- Shift codes (4/6/8/12/A/B/D/N/U/O) with auto-colored backgrounds
- Drag-and-drop cells (including color-only cells)
- Multi-cell selection (click/ctrl/shift/drag) with bulk operations
- Right-click context menu: set value, color palette, comments
- Info rows: TKB, Metro, D8 (toggleable)
- Czech holidays highlighted with names
- Cell value filter toggles in legend
- PDF export (2-page A4 landscape, Czech font support)
- Improvement proposals system
- Auto-contrast text color on manual backgrounds
- Opens at current month on load

TODO: sticky header (needs different approach)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:08:53 +02:00
Docker Config Backup
b4158d687f feat: TKB shift scheduler — personnel shift planning web app
Full rewrite of METRO HMG for TKB tunnel department:
- People-based grid (18 TKB + 5 IT), year-long calendar
- Color-coded shift values (4/6/8/12/A/B/D/N/U/O)
- Drag-and-drop cells, multi-cell selection (click/ctrl/shift/drag)
- Right-click context menu with color palette
- Tunnel closure + Metro + D8 info rows (toggleable)
- Czech holidays highlighted with names
- PDF export (2-page A4 landscape, DejaVu font for Czech chars)
- Improvement proposals system
- Sticky headers (vertical + horizontal scroll)
- Cell value filter toggles in legend

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 09:48:38 +02:00