- updated camera friendly names and improve camera settings functionality

- bugfixes for plate sizing
This commit is contained in:
2026-01-12 12:13:56 +00:00
parent d4271d488e
commit 2066552bdc
12 changed files with 111 additions and 92 deletions

View File

@@ -18,17 +18,17 @@ const SessionCard = () => {
const sightings = [...new Map(sessionList?.map((vehicle) => [vehicle.vrm, vehicle]))];
const dedupedSightings = sightings.map((sighting) => sighting[1]);
const dedupedSightings = sightings?.map((sighting) => sighting[1]);
const vehicles = dedupedSightings.reduce<Record<string, ReducedSightingType[]>>(
const vehicles = dedupedSightings?.reduce<Record<string, ReducedSightingType[]>>(
(acc, item) => {
const hotlisthit = Object.values(item.metadata?.hotlistMatches ?? {}).includes(true);
if (item.metadata?.npedJSON["NPED CATEGORY"] === "A") acc.npedCatA.push(item);
if (item.metadata?.npedJSON["NPED CATEGORY"] === "B") acc.npedCatB.push(item);
if (item.metadata?.npedJSON["NPED CATEGORY"] === "C") acc.npedCatC.push(item);
if (item.metadata?.npedJSON["NPED CATEGORY"] === "D") acc.npedCatD.push(item);
if (item.metadata?.npedJSON["TAX STATUS"] === false) acc.notTaxed.push(item);
if (item.metadata?.npedJSON["MOT STATUS"] === false) acc.notMOT.push(item);
if (item?.metadata?.npedJSON["NPED CATEGORY"] === "A") acc.npedCatA.push(item);
if (item?.metadata?.npedJSON["NPED CATEGORY"] === "B") acc.npedCatB.push(item);
if (item?.metadata?.npedJSON["NPED CATEGORY"] === "C") acc.npedCatC.push(item);
if (item?.metadata?.npedJSON["NPED CATEGORY"] === "D") acc.npedCatD.push(item);
if (item?.metadata?.npedJSON["TAX STATUS"] === false) acc.notTaxed.push(item);
if (item?.metadata?.npedJSON["MOT STATUS"] === false) acc.notMOT.push(item);
if (hotlisthit) acc.hotlistHit.push(item);
acc.vehicles.push(item);
return acc;