feat(report): filter truck list by selected site

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 11:50:00 +08:00
co-authored by Claude Sonnet 5.5
parent 149704898d
commit 5f1d7a6ed4
3 changed files with 81 additions and 5 deletions
+2
View File
@@ -44,6 +44,7 @@ export default async function ReportPage({ searchParams }: Props) {
id: trucks.id,
truckNo: trucks.truckNo,
carrier: trucks.carrier,
siteId: trucks.siteId,
})
.from(trucks)
.where(eq(trucks.active, true))
@@ -54,6 +55,7 @@ export default async function ReportPage({ searchParams }: Props) {
id: t.id,
truck_no: t.truckNo,
carrier: t.carrier ?? null,
site_id: t.siteId ?? null,
}))
const zoneRows = await asAdmin(db =>