Files
fikakassa/app/templates/backoffice.html
Joakim 9ae513a1b8 N/A
2026-11-01 22:06:14 +01:00

89 lines
4.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="sv">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Fikakassan – Backoffice</title>
<link rel="stylesheet" href="/static/css/backoffice.css">
</head>
<body>
<header class="topbar">
<div>
<div class="eyebrow">FIKAKASSAN</div>
<h1>Backoffice</h1>
</div>
<a href="/" class="shop-link">Till kassan</a>
</header>
<main class="wrap">
<section class="toolbar">
<label>Datum <input id="day" type="date"></label>
<button id="refresh">Uppdatera</button>
<span id="status"></span>
</section>
<section class="cards">
<div class="metric"><span>Försäljning</span><strong id="sales">0 kr</strong></div>
<div class="metric"><span>Betalda köp</span><strong id="orders">0</strong></div>
<div class="metric"><span>Varukostnad</span><strong id="cogs">0 kr</strong></div>
<div class="metric"><span>Svinnkostnad</span><strong id="shrink">0 kr</strong></div>
<div class="metric profit"><span>Resultat efter svinn</span><strong id="profit">0 kr</strong></div>
</section>
<section class="panel">
<div class="panel-head"><h2>Försäljning idag</h2></div>
<div class="table-wrap"><table id="salesTable"><thead><tr><th>Produkt</th><th>Antal</th><th>Försäljning</th></tr></thead><tbody></tbody></table></div>
</section>
<section class="panel">
<div class="panel-head">
<h2>Historik</h2>
<div class="history-controls">
<button type="button" id="historyMinus" class="history-step">−</button>
<label>Dagar bakåt<input id="daysBack" type="number" min="0" max="3650" step="1" value="0"></label>
<button type="button" id="historyPlus" class="history-step">+</button>
<strong id="historyRange">Idag</strong>
</div>
</div>
<div id="historyChart" class="history-chart"></div>
<div class="history-summary" id="historySummary"></div>
<div class="table-wrap"><table id="historyTable"><thead><tr><th>Datum</th><th>Köp</th><th>Försäljning</th><th>Svinn</th><th>Resultat</th></tr></thead><tbody></tbody></table></div>
</section>
<section class="panel">
<div class="panel-head"><h2>Lager</h2><button id="reloadInventory">Uppdatera lager</button></div>
<p class="hint">Butik = det som finns ute i kassan. Baklager = reservlager. Inköpspris används för varukostnad och svinnkostnad.</p>
<div class="table-wrap"><table id="inventoryTable">
<thead><tr><th>Produkt</th><th>Butik</th><th>Baklager</th><th>Totalt</th><th>Inköpspris</th><th>Lager värde</th><th>Åtgärd</th></tr></thead>
<tbody></tbody>
</table></div>
</section>
<section class="panel">
<div class="panel-head"><h2>Registrera lagerhändelse</h2></div>
<form id="movementForm" class="movement-form">
<label>Produkt<select id="mProduct"></select></label>
<label>Lager<select id="mLocation"><option value="store">Butik</option><option value="backstock">Baklager</option></select></label>
<label>Händelse<select id="mType">
<option value="purchase">Påfyllnad / inköp</option>
<option value="shrinkage">Svinn</option>
<option value="adjustment">Inventering / justering</option>
<option value="transfer">Flytta till detta lager</option>
</select></label>
<label>Antal<input id="mQty" type="number" min="1" step="1" required></label>
<label>Inköpspris/st<input id="mCost" type="number" min="0" step="0.01" placeholder="Lämna tomt för oförändrat"></label>
<label>Notering<input id="mNote" type="text" maxlength="200" placeholder="t.ex. inventering"></label>
<button type="submit">Registrera</button>
</form>
<p class="hint">Vid "Flytta till detta lager" används noteringen <code>from:backstock</code> eller <code>from:store</code> för att ange källan.</p>
</section>
<section class="panel">
<div class="panel-head"><h2>Senaste lagerhändelser</h2></div>
<div class="table-wrap"><table id="movementTable"><thead><tr><th>Tid</th><th>Produkt</th><th>Plats</th><th>Händelse</th><th>Antal</th><th>Notering</th></tr></thead><tbody></tbody></table></div>
</section>
</main>
<script src="/static/js/backoffice.js"></script>
</body>
</html>