Add Jinja2 web UI with Bootstrap 5 dark theme
- app/templates/: base layout with sidebar nav + 6 pages (dashboard, printers, jobs, filaments, todos, pricing) - app/routers/ui.py: HTML routes querying the DB live - API routes moved to /api/* prefix - requirements: jinja2, python-multipart Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
30
app/templates/pricing.html
Normal file
30
app/templates/pricing.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Pricing — POPS{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h5 class="text-white mb-4">Pricing Configuration</h5>
|
||||
{% if configs %}
|
||||
<div class="row g-3">
|
||||
{% for c in configs %}
|
||||
<div class="col-md-6 col-xl-4">
|
||||
<div class="card p-3">
|
||||
<div class="d-flex justify-content-between align-items-start mb-3">
|
||||
<span class="fw-semibold text-white">{{ c.name }}</span>
|
||||
<span class="text-secondary small">from {{ c.valid_from.strftime('%d.%m.%Y') }}</span>
|
||||
</div>
|
||||
<table class="table table-dark table-sm mb-0" style="font-size:.85rem">
|
||||
<tbody>
|
||||
<tr><td class="text-secondary border-0">Electricity</td><td class="text-end border-0">€ {{ "%.4f"|format(c.electricity_kwh_eur) }} / kWh</td></tr>
|
||||
<tr><td class="text-secondary">Printer draw</td><td class="text-end">{{ c.printer_watt }} W</td></tr>
|
||||
<tr><td class="text-secondary">Hourly rate</td><td class="text-end">€ {{ "%.2f"|format(c.hourly_rate_eur) }} / h</td></tr>
|
||||
<tr><td class="text-secondary">Markup</td><td class="text-end">{{ c.markup_percent }} %</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card"><div class="card-body text-secondary">No pricing config yet.</div></div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user