feat(trucks): site_id column and site/truck helpers

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 11:44:37 +08:00
co-authored by Claude Sonnet 5.5
parent fd7a55337f
commit 867b725262
9 changed files with 105 additions and 1 deletions
+5
View File
@@ -31,3 +31,8 @@ export function resolveZoneToken(args: {
}
return null
}
export function siteIdForToken(sites: SiteOption[], token: string | null): string {
if (!token) return ''
return sites.find(s => s.zones.some(z => z.qr_code_token === token))?.id ?? ''
}