Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASA: Fix fire zone unit name lookup, adjust zone -> shape naming #3207

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading