Skip to content

Commit

Permalink
ASA: Fix fire zone unit name lookup, adjust zone -> shape naming (bcg…
Browse files Browse the repository at this point in the history
  • Loading branch information
conbrad authored Nov 1, 2023
1 parent ffa3153 commit 01a970b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web/src/features/fba/components/map/FBAMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
16 changes: 8 additions & 8 deletions web/src/features/fba/pages/FireBehaviourAdvisoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const FireBehaviourAdvisoryPage: React.FunctionComponent = () => {
const [fireCenter, setFireCenter] = useState<FireCenter | undefined>(undefined)

const [advisoryThreshold, setAdvisoryThreshold] = useState(20)
const [selectedFireZone, setSelectedFireZone] = useState<FireShape | undefined>(undefined)
const [selectedFireShape, setSelectedFireShape] = useState<FireShape | undefined>(undefined)
const [dateOfInterest, setDateOfInterest] = useState(
DateTime.now().setZone(`UTC${PST_UTC_OFFSET}`).hour < 13
? DateTime.now().setZone(`UTC${PST_UTC_OFFSET}`)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -222,7 +222,7 @@ const FireBehaviourAdvisoryPage: React.FunctionComponent = () => {
<Grid item>
<ZoneSummaryPanel
ref={sidePanelRef}
selectedFireZone={selectedFireZone}
selectedFireZone={selectedFireShape}
fuelTypeInfo={hfiThresholdsFuelTypes}
hfiElevationInfo={fireZoneElevationInfo}
fireShapeAreas={fireShapeAreas}
Expand All @@ -234,10 +234,10 @@ const FireBehaviourAdvisoryPage: React.FunctionComponent = () => {
<FBAMap
forDate={dateOfInterest}
runType={runType}
selectedFireShape={selectedFireZone}
selectedFireShape={selectedFireShape}
selectedFireCenter={fireCenter}
advisoryThreshold={advisoryThreshold}
setSelectedFireShape={setSelectedFireZone}
setSelectedFireShape={setSelectedFireShape}
fireShapeAreas={fireShapeAreas}
showSummaryPanel={showSummaryPanel}
setShowSummaryPanel={setShowSummaryPanel}
Expand Down

0 comments on commit 01a970b

Please sign in to comment.