feat: refactor to FastAPI architecture v2.0
Some checks failed
Build & Push Docker / build (push) Has been cancelled
Some checks failed
Build & Push Docker / build (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
134
app/static/index.html
Normal file
134
app/static/index.html
Normal file
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="cs">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Scenar Creator</title>
|
||||
<link rel="stylesheet" href="/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Scenar Creator</h1>
|
||||
<p class="subtitle">Tvorba časových harmonogramů</p>
|
||||
|
||||
<!-- Tabs -->
|
||||
<div class="tabs">
|
||||
<button class="tab active" onclick="switchTab(event, 'importTab')">Importovat Excel</button>
|
||||
<button class="tab" onclick="switchTab(event, 'builderTab')">Vytvořit inline</button>
|
||||
</div>
|
||||
|
||||
<!-- Import Excel Tab -->
|
||||
<div id="importTab" class="tab-content active">
|
||||
<form id="importForm" onsubmit="return handleImport(event)">
|
||||
<div class="form-group">
|
||||
<label for="importTitle">Název akce:</label>
|
||||
<input type="text" id="importTitle" name="title" maxlength="200" required placeholder="Název události">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="importDetail">Detail:</label>
|
||||
<input type="text" id="importDetail" name="detail" maxlength="500" required placeholder="Popis události">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="excelFile">Excel soubor:</label>
|
||||
<input type="file" id="excelFile" name="file" accept=".xlsx,.xls" required>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">Importovat</button>
|
||||
<a href="/api/template" class="btn btn-secondary">Stáhnout šablonu</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Builder Tab -->
|
||||
<div id="builderTab" class="tab-content">
|
||||
<form id="builderForm" onsubmit="return handleBuild(event)">
|
||||
<div class="form-group">
|
||||
<label for="builderTitle">Název akce:</label>
|
||||
<input type="text" id="builderTitle" name="title" maxlength="200" required placeholder="Název události">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="builderDetail">Detail:</label>
|
||||
<input type="text" id="builderDetail" name="detail" maxlength="500" required placeholder="Popis události">
|
||||
</div>
|
||||
|
||||
<h3>Typy programů</h3>
|
||||
<div id="typesContainer">
|
||||
<div class="type-row" data-index="0">
|
||||
<input type="text" name="type_name_0" placeholder="Kód typu (např. WORKSHOP)" class="type-code">
|
||||
<input type="text" name="type_desc_0" placeholder="Popis">
|
||||
<input type="color" name="type_color_0" value="#0070C0">
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="removeTypeRow(0)">X</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-secondary btn-sm" onclick="addTypeRow()">+ Přidat typ</button>
|
||||
|
||||
<h3>Časový harmonogram</h3>
|
||||
<datalist id="availableTypes"></datalist>
|
||||
<div id="scheduleContainer">
|
||||
<table id="scheduleTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>Začátek</th>
|
||||
<th>Konec</th>
|
||||
<th>Program</th>
|
||||
<th>Typ</th>
|
||||
<th>Garant</th>
|
||||
<th>Poznámka</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="scheduleBody">
|
||||
<tr data-index="0">
|
||||
<td><input type="date" name="datum_0" required></td>
|
||||
<td><input type="time" name="zacatek_0" required></td>
|
||||
<td><input type="time" name="konec_0" required></td>
|
||||
<td><input type="text" name="program_0" required placeholder="Název bloku"></td>
|
||||
<td><input type="text" name="typ_0" list="availableTypes" required placeholder="Typ"></td>
|
||||
<td><input type="text" name="garant_0" placeholder="Garant"></td>
|
||||
<td><input type="text" name="poznamka_0" placeholder="Poznámka"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm" onclick="removeScheduleRow(0)">X</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="btn btn-secondary btn-sm" onclick="addScheduleRow()">+ Přidat řádek</button>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary" name="format" value="excel">Stáhnout Excel</button>
|
||||
<button type="button" class="btn btn-primary" onclick="handleBuildPdf()">Stáhnout PDF</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Import results / editor area -->
|
||||
<div id="editorArea" class="editor-area" style="display:none;">
|
||||
<h2>Importovaná data</h2>
|
||||
<div id="importedInfo"></div>
|
||||
|
||||
<h3>Typy programů</h3>
|
||||
<div id="importedTypesContainer"></div>
|
||||
|
||||
<h3>Bloky</h3>
|
||||
<div id="importedBlocksContainer"></div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" onclick="generateExcelFromImport()">Stáhnout Excel</button>
|
||||
<button class="btn btn-primary" onclick="generatePdfFromImport()">Stáhnout PDF</button>
|
||||
<button class="btn btn-secondary" onclick="exportJson()">Exportovat JSON</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JSON import -->
|
||||
<div class="json-import">
|
||||
<label>Importovat JSON: <input type="file" id="jsonFile" accept=".json" onchange="handleJsonImport(event)"></label>
|
||||
</div>
|
||||
|
||||
<div id="statusMessage" class="status-message" style="display:none;"></div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/api.js"></script>
|
||||
<script src="/static/js/export.js"></script>
|
||||
<script src="/static/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user