- updated camera friendly names and improve camera settings functionality
- bugfixes for plate sizing
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user