Skip to content

Commit

Permalink
[Tech] changes after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Dec 3, 2024
1 parent 5b428e0 commit 392e038
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ const getActionFeature = (
return feature
}

const isActionControlOrActionSurveillance = (f): f is ControlOrSurveillance =>
f.actionType === ActionTypeEnum.CONTROL || f.actionType === ActionTypeEnum.SURVEILLANCE
const isActionControlOrActionSurveillance = (feature): feature is ControlOrSurveillance =>
feature.actionType === ActionTypeEnum.CONTROL || feature.actionType === ActionTypeEnum.SURVEILLANCE

export const getActionsFeatures = (mission, isEditingSurveillanceZoneOrControlPoint = false) => {
const { envActions, geom: missionGeom } = mission
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ export function ControlForm({
const isGeomSameAsAttachedReportingGeom = useMemo(() => {
const attachedReporting = attachedReportings?.find(reporting => reporting.id === currentAction?.reportingIds[0])

if (
attachedReporting?.geom?.type &&
currentAction?.geom?.type &&
attachedReporting?.geom?.type !== currentAction?.geom?.type
) {
return false
}

return !!(
attachedReporting?.geom &&
currentAction?.geom &&
Expand Down

0 comments on commit 392e038

Please sign in to comment.