diff --git a/src/components/Filters/filterOptions.ts b/src/components/Filters/filterOptions.ts index d387d10d..b8bc4ebf 100644 --- a/src/components/Filters/filterOptions.ts +++ b/src/components/Filters/filterOptions.ts @@ -414,39 +414,29 @@ export const rcos: string[] = [ ]; export const zoning: string[] = [ - 'CA-1', - 'CA-2', - 'CMX-1', - 'CMX-2', - 'CMX-2.5', - 'CMX-3', - 'CMX-4', - 'CMX-5', - 'I-1', - 'I-2', - 'I-3', - 'I-P', + 'CA', + 'CMX', + 'I', 'ICMX', 'IRMX', - 'RM-1', - 'RM-2', - 'RM-3', - 'RM-4', - 'RMX-1', - 'RMX-2', - 'RMX-3', - 'RSA-1', - 'RSA-2', - 'RSA-3', - 'RSA-4', - 'RSA-5', - 'RSA-6', - 'RSD-1', - 'RSD-2', - 'RSD-3', - 'RTA-1', - 'SP-AIR', - 'SP-INS', - 'SP-PO-A', - 'SP-STA', + 'RM', + 'RMX', + 'RSA', + 'RSD', + 'RTA', + 'SP', ]; + +export const subZoning: Record = { + CA: ['CA-1', 'CA-2'], + CMX: ['CMX-1', 'CMX-2', 'CMX-2.5', 'CMX-3', 'CMX-4', 'CMX-5'], + I: ['I-1', 'I-2', 'I-3', 'I-P'], + ICMX: ['ICMX'], + IRMX: ['IRMX'], + RM: ['RM-1', 'RM-2', 'RM-3', 'RM-4'], + RMX: ['RMX-1', 'RMX-2', 'RMX-3'], + RSA: ['RSA-1', 'RSA-2', 'RSA-3', 'RSA-4', 'RSA-5', 'RSA-6'], + RSD: ['RSD-1', 'RSD-2', 'RSD-3'], + RTA: ['RTA-1'], + SP: ['SP-AIR', 'SP-INS', 'SP-PO-A', 'SP-STA'], +}; diff --git a/src/components/IconLink.tsx b/src/components/IconLink.tsx index 0ff8c96f..32ff8c33 100644 --- a/src/components/IconLink.tsx +++ b/src/components/IconLink.tsx @@ -32,8 +32,8 @@ function IconLink({ icon, text, href }: IconLinkProps) { startContent={
{icon}
} className={ pathname === href - ? 'active-state-nav gap-0' - : 'iconLink bg-color-none gap-0' + ? 'active-state-nav gap-0 w-full justify-start' + : 'iconLink bg-color-none gap-0 w-full justify-start' } // className="flex text-gray-900 items-center active:bg-[#E9FFE5] active:text-green-700 focus:text-green-700 focus:bg-[#E9FFE5] hover:gray-100 bg-color-none hover:bg-gray-10" > diff --git a/src/components/PropertyMap.tsx b/src/components/PropertyMap.tsx index bd50d506..efa378ad 100644 --- a/src/components/PropertyMap.tsx +++ b/src/components/PropertyMap.tsx @@ -14,6 +14,7 @@ import { useStagingTiles, googleCloudBucketName, } from '../config/config'; +import { subZoning } from './Filters/filterOptions'; import { useFilter } from '@/context/FilterContext'; import Map, { Source, @@ -357,6 +358,19 @@ const PropertyMap: FC = ({ } else { thisFilterGroup.push(['in', ['get', property], item]); } + if (Object.keys(subZoning).includes(item)) { + subZoning[item].forEach((subZone: string) => { + if (filterItem) { + thisFilterGroup.push([ + '>=', + ['index-of', subZone, ['get', property]], + 0, + ]); + } else { + thisFilterGroup.push(['in', ['get', property], subZone]); + } + }); + } }); acc.push(thisFilterGroup);