Add MOT/insurance renewal hints, table service card, and favicon
- Renewal tracking: compute due/overdue status from the most recent mot/insurance event (renewal_months, renewal_due_soon_days settings), surfaced on the service card and dashboard. - Service-status card metrics now render as a two-column label/value table with row separators instead of wrapping auto-fill grid cells. - Add a bicycle favicon (favicon.svg) to base + login templates. Co-Authored-By: opencode <opencode@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}bike-admin{% endblock %}</title>
|
||||
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="/static/main.css">
|
||||
<script src="/static/htmx.min.js" defer></script>
|
||||
</head>
|
||||
|
||||
@@ -20,4 +20,16 @@
|
||||
<dt>Records</dt><dd>{{ summary.event_count }}</dd>
|
||||
<dt>Cost to date</dt><dd>{{ summary.total_cost | money }}</dd>
|
||||
</dl>
|
||||
<div class="renewals">
|
||||
<div class="renewal">
|
||||
<span class="renewal-label">MOT</span>
|
||||
<span class="badge {{ renewal_class(summary.mot) }} {{ summary.mot.status }}">{{ renewal_text(summary.mot) }}</span>
|
||||
<span class="muted">due {{ summary.mot.due_date if summary.mot.due_date else 'n/a' }}</span>
|
||||
</div>
|
||||
<div class="renewal">
|
||||
<span class="renewal-label">Insurance</span>
|
||||
<span class="badge {{ renewal_class(summary.insurance) }} {{ summary.insurance.status }}">{{ renewal_text(summary.insurance) }}</span>
|
||||
<span class="muted">due {{ summary.insurance.due_date if summary.insurance.due_date else 'n/a' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
{% if s.bike.service_interval_miles %}
|
||||
<dt>Every</dt><dd>{{ s.bike.service_interval_miles | money }} mi</dd>
|
||||
{% endif %}
|
||||
<dt>MOT</dt><dd><span class="badge {{ renewal_class(s.mot) }}">{{ renewal_text(s.mot) }}</span></dd>
|
||||
<dt>Insurance</dt><dd><span class="badge {{ renewal_class(s.insurance) }}">{{ renewal_text(s.insurance) }}</span></dd>
|
||||
<dt>Records</dt><dd>{{ s.event_count }}</dd>
|
||||
<dt>Cost to date</dt><dd>{{ s.total_cost | money }}</dd>
|
||||
</dl>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Log in - bike-admin</title>
|
||||
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="/static/main.css">
|
||||
</head>
|
||||
<body class="auth">
|
||||
|
||||
Reference in New Issue
Block a user