From 60becdb8d712f895ac85a0dd69afb5e64cb5822b Mon Sep 17 00:00:00 2001 From: Conor Brady Date: Wed, 1 Nov 2023 16:28:17 -0700 Subject: [PATCH] ASA: Fix fire zone unit name lookup, adjust zone -> shape naming (#3207) --- web/src/features/fba/components/map/FBAMap.tsx | 2 +- .../fba/pages/FireBehaviourAdvisoryPage.tsx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/src/features/fba/components/map/FBAMap.tsx b/web/src/features/fba/components/map/FBAMap.tsx index 2c04e7ecf..efd6f1dff 100644 --- a/web/src/features/fba/components/map/FBAMap.tsx +++ b/web/src/features/fba/components/map/FBAMap.tsx @@ -156,7 +156,7 @@ const FBAMap = (props: FBAMapProps) => { } const fireZone: FireShape = { fire_shape_id: feature.getProperties().OBJECTID, - mof_fire_zone_name: feature.getProperties().OBJECTID.FIRE_ZONE, + mof_fire_zone_name: feature.getProperties().FIRE_ZONE, mof_fire_centre_name: feature.getProperties().FIRE_CENTR, area_sqm: feature.getProperties().Shape_Area } diff --git a/web/src/features/fba/pages/FireBehaviourAdvisoryPage.tsx b/web/src/features/fba/pages/FireBehaviourAdvisoryPage.tsx index 1fa7ab466..60a23796b 100644 --- a/web/src/features/fba/pages/FireBehaviourAdvisoryPage.tsx +++ b/web/src/features/fba/pages/FireBehaviourAdvisoryPage.tsx @@ -53,7 +53,7 @@ const FireBehaviourAdvisoryPage: React.FunctionComponent = () => { const [fireCenter, setFireCenter] = useState(undefined) const [advisoryThreshold, setAdvisoryThreshold] = useState(20) - const [selectedFireZone, setSelectedFireZone] = useState(undefined) + const [selectedFireShape, setSelectedFireShape] = useState(undefined) const [dateOfInterest, setDateOfInterest] = useState( DateTime.now().setZone(`UTC${PST_UTC_OFFSET}`).hour < 13 ? DateTime.now().setZone(`UTC${PST_UTC_OFFSET}`) @@ -112,14 +112,14 @@ const FireBehaviourAdvisoryPage: React.FunctionComponent = () => { !isNull(mostRecentRunDate) && !isNull(doiISODate) && !isUndefined(mostRecentRunDate) && - !isUndefined(selectedFireZone) + !isUndefined(selectedFireShape) ) { - dispatch(fetchHighHFIFuels(runType, doiISODate, mostRecentRunDate.toString(), selectedFireZone.fire_shape_id)) + dispatch(fetchHighHFIFuels(runType, doiISODate, mostRecentRunDate.toString(), selectedFireShape.fire_shape_id)) dispatch( - fetchfireZoneElevationInfo(selectedFireZone.fire_shape_id, runType, doiISODate, mostRecentRunDate.toString()) + fetchfireZoneElevationInfo(selectedFireShape.fire_shape_id, runType, doiISODate, mostRecentRunDate.toString()) ) } - }, [mostRecentRunDate, selectedFireZone]) // eslint-disable-line react-hooks/exhaustive-deps + }, [mostRecentRunDate, selectedFireShape]) // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { const doiISODate = dateOfInterest.toISODate() @@ -222,7 +222,7 @@ const FireBehaviourAdvisoryPage: React.FunctionComponent = () => { {