Skip to content

Commit

Permalink
only flash location field if field trip panel open
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Sep 18, 2023
1 parent b04367a commit 3393d3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/components/app/call-taker-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class CallTakerPanel extends Component {
if (
// Only enabled when field trip is enabled, as otherwise
// this flashes a lot, possibly to an annoying extent
this.props.fieldTripEnabled &&
this.props.fieldTripVisible &&
(prevProps?.currentQuery?.from?.name !==
this.props?.currentQuery?.from?.name ||
prevProps?.currentQuery?.to?.name !==
Expand Down Expand Up @@ -338,7 +338,7 @@ class CallTakerPanel extends Component {

// connect to the redux store
const mapStateToProps = (state) => {
const { activeId, requests } = state.callTaker.fieldTrip
const { activeId, groupSize, requests, visible } = state.callTaker.fieldTrip
const request = requests.data.find((req) => req.id === activeId)
const showUserSettings = getShowUserSettings(state)
const moduleConfig = getModuleConfig(state, Modules.CALL_TAKER)?.options
Expand All @@ -351,8 +351,8 @@ const mapStateToProps = (state) => {
return {
activeSearch: getActiveSearch(state),
currentQuery: state.otp.currentQuery,
fieldTripEnabled: isModuleEnabled(state, Modules.FIELD_TRIP),
groupSize: state.callTaker.fieldTrip.groupSize,
fieldTripVisible: visible,
groupSize,
mainPanelContent: state.otp.ui.mainPanelContent,
maxGroupSize: getGroupSize(request),
modeDropdownOptions:
Expand Down

0 comments on commit 3393d3a

Please sign in to comment.