Add SQL management UI, maintenance, and trip edit pages for motorcycles
This commit is contained in:
@@ -2,13 +2,13 @@ import Link from "next/link";
|
||||
import { notFound } from "next/navigation";
|
||||
import { requireSessionUser } from "@/lib/auth";
|
||||
import { db, initDatabase } from "@/lib/db";
|
||||
import { formatMotorcycleName } from "@/lib/format";
|
||||
import { motorcycleAccessFilter } from "@/lib/motorcycle-access";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
|
||||
type MotorcycleMaintenanceRow = {
|
||||
id: number;
|
||||
nickname: string;
|
||||
brand: string;
|
||||
model: string;
|
||||
year: number | null;
|
||||
@@ -108,7 +108,7 @@ export default async function MotorcycleMaintenancePage({
|
||||
const visible = motorcycleAccessFilter(user);
|
||||
const bike = db
|
||||
.prepare(
|
||||
`SELECT id, nickname, brand, model, year,
|
||||
`SELECT id, brand, model, year,
|
||||
tire_pressure_front_bar, tire_pressure_rear_bar, chain_tension_min_mm, chain_tension_max_mm,
|
||||
oil_type, oil_capacity_liters,
|
||||
oil_check_temp, oil_check_run_minutes, oil_check_wait_min_minutes, oil_check_wait_max_minutes, oil_check_method
|
||||
@@ -126,7 +126,9 @@ export default async function MotorcycleMaintenancePage({
|
||||
<div className="breadcrumbs">
|
||||
<Link href="/">Übersicht</Link>
|
||||
<span>/</span>
|
||||
<Link href={`/motorcycles/${bike.id}`}>{bike.nickname}</Link>
|
||||
<Link href={`/motorcycles/${bike.id}`}>
|
||||
{formatMotorcycleName(bike.brand, bike.model)}
|
||||
</Link>
|
||||
<span>/</span>
|
||||
Wartungsansicht
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user