Skip to content

Commit b7cdd74

Browse files
Merge pull request #1077 from CodeForPhilly/staging
Weekly PR from Staging to Main
2 parents dbc2540 + c92d061 commit b7cdd74

File tree

3 files changed

+39
-35
lines changed

3 files changed

+39
-35
lines changed

src/components/Filters/filterOptions.ts

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -414,39 +414,29 @@ export const rcos: string[] = [
414414
];
415415

416416
export const zoning: string[] = [
417-
'CA-1',
418-
'CA-2',
419-
'CMX-1',
420-
'CMX-2',
421-
'CMX-2.5',
422-
'CMX-3',
423-
'CMX-4',
424-
'CMX-5',
425-
'I-1',
426-
'I-2',
427-
'I-3',
428-
'I-P',
417+
'CA',
418+
'CMX',
419+
'I',
429420
'ICMX',
430421
'IRMX',
431-
'RM-1',
432-
'RM-2',
433-
'RM-3',
434-
'RM-4',
435-
'RMX-1',
436-
'RMX-2',
437-
'RMX-3',
438-
'RSA-1',
439-
'RSA-2',
440-
'RSA-3',
441-
'RSA-4',
442-
'RSA-5',
443-
'RSA-6',
444-
'RSD-1',
445-
'RSD-2',
446-
'RSD-3',
447-
'RTA-1',
448-
'SP-AIR',
449-
'SP-INS',
450-
'SP-PO-A',
451-
'SP-STA',
422+
'RM',
423+
'RMX',
424+
'RSA',
425+
'RSD',
426+
'RTA',
427+
'SP',
452428
];
429+
430+
export const subZoning: Record<string, string[]> = {
431+
CA: ['CA-1', 'CA-2'],
432+
CMX: ['CMX-1', 'CMX-2', 'CMX-2.5', 'CMX-3', 'CMX-4', 'CMX-5'],
433+
I: ['I-1', 'I-2', 'I-3', 'I-P'],
434+
ICMX: ['ICMX'],
435+
IRMX: ['IRMX'],
436+
RM: ['RM-1', 'RM-2', 'RM-3', 'RM-4'],
437+
RMX: ['RMX-1', 'RMX-2', 'RMX-3'],
438+
RSA: ['RSA-1', 'RSA-2', 'RSA-3', 'RSA-4', 'RSA-5', 'RSA-6'],
439+
RSD: ['RSD-1', 'RSD-2', 'RSD-3'],
440+
RTA: ['RTA-1'],
441+
SP: ['SP-AIR', 'SP-INS', 'SP-PO-A', 'SP-STA'],
442+
};

src/components/IconLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ function IconLink({ icon, text, href }: IconLinkProps) {
3232
startContent={<div className="linkIcon">{icon}</div>}
3333
className={
3434
pathname === href
35-
? 'active-state-nav gap-0'
36-
: 'iconLink bg-color-none gap-0'
35+
? 'active-state-nav gap-0 w-full justify-start'
36+
: 'iconLink bg-color-none gap-0 w-full justify-start'
3737
}
3838
// 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"
3939
>

src/components/PropertyMap.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
useStagingTiles,
1515
googleCloudBucketName,
1616
} from '../config/config';
17+
import { subZoning } from './Filters/filterOptions';
1718
import { useFilter } from '@/context/FilterContext';
1819
import Map, {
1920
Source,
@@ -357,6 +358,19 @@ const PropertyMap: FC<PropertyMapProps> = ({
357358
} else {
358359
thisFilterGroup.push(['in', ['get', property], item]);
359360
}
361+
if (Object.keys(subZoning).includes(item)) {
362+
subZoning[item].forEach((subZone: string) => {
363+
if (filterItem) {
364+
thisFilterGroup.push([
365+
'>=',
366+
['index-of', subZone, ['get', property]],
367+
0,
368+
]);
369+
} else {
370+
thisFilterGroup.push(['in', ['get', property], subZone]);
371+
}
372+
});
373+
}
360374
});
361375

362376
acc.push(thisFilterGroup);

0 commit comments

Comments
 (0)