wip: local portal changes (backup before disk cleanup)

This commit is contained in:
Ondřej Glaser
2026-07-07 13:16:26 +02:00
parent 48cef99257
commit 79b17be817
774 changed files with 8592 additions and 245 deletions

View File

@@ -0,0 +1,137 @@
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nabídka → objednávka | Colsys AI</title>
<!-- Relative base works both behind the portal (/apps/nabidky/) and
standalone at the root (/) on the production host. -->
<base href="./">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap">
<link rel="stylesheet" href="static/vendor/flatpickr.min.css?v=10">
<link rel="stylesheet" href="static/styles.css?v=10">
<link rel="stylesheet" href="static/extra.css?v=10">
<script>
// Theme bootstrap — ?theme= URL → portal_theme cookie → app_theme localStorage → OS
(function () {
var t = null;
try {
var p = new URL(window.location.href).searchParams.get("theme");
if (p === "dark" || p === "light") t = p;
} catch (e) {}
if (!t) {
var m = document.cookie.match(/(?:^|;\s*)portal_theme=([^;]+)/);
if (m) t = decodeURIComponent(m[1]);
}
if (!t) { try { t = localStorage.getItem("app_theme"); } catch (e) {} }
if (!t && typeof matchMedia !== "undefined") {
try { t = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } catch (e) {}
}
if (t === "dark" || t === "light") {
document.documentElement.classList.add(t);
try { localStorage.setItem("app_theme", t); } catch (e) {}
}
})();
function _resync() {
var m = document.cookie.match(/(?:^|;\s*)portal_theme=([^;]+)/);
if (!m) return;
var t = decodeURIComponent(m[1]);
if (t !== "dark" && t !== "light") return;
var cls = document.documentElement.classList;
if (cls.contains(t)) return;
cls.remove(t === "dark" ? "light" : "dark");
cls.add(t);
try { localStorage.setItem("app_theme", t); } catch (e) {}
}
document.addEventListener("visibilitychange", function () {
if (document.visibilityState === "visible") _resync();
});
window.addEventListener("pageshow", _resync);
</script>
</head>
<body>
<header class="header">
<div class="header-inner">
<a href="/" class="brand">
<span class="brand-icon">C</span>
<span class="brand-name">Colsys <span class="brand-ai">AI</span></span>
</a>
<span class="header-crumb">Nabídka → Excel</span>
<a href="/" class="back-link" title="Zpět na portál">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="m15 18-6-6 6-6"/>
</svg>
<span>Zpět na portál</span>
</a>
</div>
</header>
<main class="main">
<section id="s-upload">
<div class="section-intro">
<h1 class="section-title">Převod nabídky do Excelu</h1>
<p class="section-desc">
Nahrajte dodavatelskou nabídku (PDF nebo Excel). Aplikace z ní
vytáhne údaje o dodavateli a položky a připraví Excel v jednotném
tvaru. Před stažením můžete data zkontrolovat a upravit.
</p>
</div>
<div id="drop-zone" class="drop-zone">
<svg class="drop-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round"
d="M12 16.5V4.5m0 0-3.75 3.75M12 4.5l3.75 3.75M4.5 19.5h15"/>
</svg>
<p class="drop-text">Přetáhněte nabídku sem</p>
<p class="drop-or">nebo</p>
<button class="btn btn-secondary" id="browse-btn" type="button">Vybrat soubor</button>
<p class="drop-formats">PDF · XLSX</p>
<input type="file" id="file-input" accept=".pdf,.xlsx,.xlsm,.xls" style="display:none">
</div>
</section>
<section id="s-processing" class="hidden">
<div class="processing-card">
<div class="spinner"></div>
<h2 class="processing-title">Čtu nabídku…</h2>
<p class="processing-sub">AI extrahuje dodavatele a položky. Obvykle 10–40 sekund.</p>
</div>
</section>
<section id="s-result" class="hidden">
<div class="results-header">
<div>
<h2 class="results-title">Extrahovaná data</h2>
<p class="results-meta">Zkontrolujte hodnoty, případně upravte, a stáhněte Excel.</p>
</div>
<div class="results-actions">
<button class="btn btn-secondary" id="restart-btn" type="button">Nová nabídka</button>
<button class="btn btn-secondary" id="export-btn" type="button">
<svg class="btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v12m0 0-3.75-3.75M12 16.5l3.75-3.75M4.5 19.5h15"/>
</svg>
Stáhnout Excel
</button>
<button class="btn btn-primary" id="order-pdf-btn" type="button">
<svg class="btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v12m0 0-3.75-3.75M12 16.5l3.75-3.75M4.5 19.5h15"/>
</svg>
Objednávka (PDF)
</button>
</div>
</div>
<div class="offer-form" id="offer-form"></div>
</section>
</main>
<script src="static/vendor/flatpickr.min.js?v=10"></script>
<script src="static/vendor/flatpickr.cs.js?v=10"></script>
<script src="static/app.js?v=10"></script>
</body>
</html>