feat: v3.0 - canvas editor, JSON-only, no Excel, new UI
Some checks failed
Build & Push Docker / build (push) Has been cancelled

- Remove all Excel code (import, export, template, pandas, openpyxl)
- New canvas-based schedule editor with drag & drop (interact.js)
- Modern 3-panel UI: sidebar, canvas, documentation tab
- New data model: Block with id/date/start/end, ProgramType with id/name/color
- Clean API: GET /api/health, POST /api/validate, GET /api/sample, POST /api/generate-pdf
- Rewritten PDF generator using ScenarioDocument directly (no DataFrame)
- Professional PDF output: dark header, colored blocks, merged cells, legend, footer
- Sample JSON: "Zimní výjezd oddílu" with 11 blocks, 3 program types
- 30 tests passing (API, core models, PDF generation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 17:02:51 +01:00
parent e2bdadd0ce
commit 25fd578543
27 changed files with 2004 additions and 3016 deletions

138
app/static/sample.json Normal file
View File

@@ -0,0 +1,138 @@
{
"version": "1.0",
"event": {
"title": "Zimní výjezd oddílu",
"subtitle": "Víkendový zážitkový kurz pro mladé",
"date": "2026-03-01",
"location": "Chata Horní Lhota"
},
"program_types": [
{
"id": "morning",
"name": "Ranní program",
"color": "#F97316"
},
{
"id": "main",
"name": "Hlavní program",
"color": "#3B82F6"
},
{
"id": "rest",
"name": "Odpočinek",
"color": "#22C55E"
}
],
"blocks": [
{
"id": "b1",
"date": "2026-03-01",
"start": "08:00",
"end": "08:30",
"title": "Budíček a rozcvička",
"type_id": "morning",
"responsible": "Kuba",
"notes": "Venkovní rozcvička, pokud počasí dovolí"
},
{
"id": "b2",
"date": "2026-03-01",
"start": "08:30",
"end": "09:00",
"title": "Snídaně",
"type_id": "rest",
"responsible": "Kuchyň",
"notes": null
},
{
"id": "b3",
"date": "2026-03-01",
"start": "09:00",
"end": "10:30",
"title": "Stopovací hra v lese",
"type_id": "main",
"responsible": "Lucka",
"notes": "Rozdělení do 4 skupin, mapky připraveny"
},
{
"id": "b4",
"date": "2026-03-01",
"start": "10:30",
"end": "11:00",
"title": "Svačina a pauza",
"type_id": "rest",
"responsible": null,
"notes": null
},
{
"id": "b5",
"date": "2026-03-01",
"start": "11:00",
"end": "12:30",
"title": "Stavba iglú / přístřešků",
"type_id": "main",
"responsible": "Petr",
"notes": "Soutěž o nejlepší stavbu, potřeba lopaty a plachty"
},
{
"id": "b6",
"date": "2026-03-01",
"start": "12:30",
"end": "14:00",
"title": "Oběd a polední klid",
"type_id": "rest",
"responsible": "Kuchyň",
"notes": "Guláš + čaj"
},
{
"id": "b7",
"date": "2026-03-01",
"start": "14:00",
"end": "16:00",
"title": "Orientační běh",
"type_id": "main",
"responsible": "Honza",
"notes": "Trasa 3 km, kontroly rozmístěny od rána"
},
{
"id": "b8",
"date": "2026-03-01",
"start": "16:00",
"end": "16:30",
"title": "Svačina",
"type_id": "rest",
"responsible": null,
"notes": null
},
{
"id": "b9",
"date": "2026-03-01",
"start": "16:30",
"end": "18:00",
"title": "Workshopy dle výběru",
"type_id": "morning",
"responsible": "Lucka + Petr",
"notes": "Uzlování / Orientace s buzolou / Kresba mapy"
},
{
"id": "b10",
"date": "2026-03-01",
"start": "18:00",
"end": "19:00",
"title": "Večeře",
"type_id": "rest",
"responsible": "Kuchyň",
"notes": null
},
{
"id": "b11",
"date": "2026-03-01",
"start": "19:00",
"end": "21:00",
"title": "Noční hra Světlušky",
"type_id": "main",
"responsible": "Honza + Kuba",
"notes": "Potřeba: čelovky, reflexní pásky, vysílačky"
}
]
}