Use identifier field for unknown license plates (#17123)

* backend

* backend fixes

* api for search queries

* frontend

* docs

* add filterable scroll list to more filters pane for identifiers

* always publish identifier
This commit is contained in:
Josh Hawkins
2025-03-12 14:38:28 -06:00
committed by GitHub
parent 9e70bddc9d
commit 6360802612
16 changed files with 332 additions and 15 deletions
@@ -333,6 +333,18 @@ function ObjectDetailsTab({
}
}, [search]);
const identifierScore = useMemo(() => {
if (!search) {
return undefined;
}
if (search.data.identifier && search.data?.identifier_score) {
return Math.round((search.data?.identifier_score ?? 0) * 100);
} else {
return undefined;
}
}, [search]);
const averageEstimatedSpeed = useMemo(() => {
if (!search || !search.data?.average_estimated_speed) {
return undefined;
@@ -538,6 +550,17 @@ function ObjectDetailsTab({
</Tooltip>
</div>
</div>
{search?.data.identifier && (
<div className="flex flex-col gap-1.5">
<div className="text-sm text-primary/40">Identifier</div>
<div className="flex flex-col space-y-0.5 text-sm">
<div className="flex flex-row items-center gap-2">
{search.data.identifier}{" "}
{identifierScore && ` (${identifierScore}%)`}
</div>
</div>
</div>
)}
<div className="flex flex-col gap-1.5">
<div className="text-sm text-primary/40">
<div className="flex flex-row items-center gap-1">