- attempted fix on NPED Category

This commit is contained in:
2026-01-13 15:29:04 +00:00
parent 2066552bdc
commit 7016fdf632
2 changed files with 7 additions and 7 deletions

View File

@@ -23,12 +23,12 @@ const SessionCard = () => {
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;