From 3393d3afdb19b3bdf5a6a4660481727c7343c40e Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Mon, 18 Sep 2023 11:38:23 -0400 Subject: [PATCH] only flash location field if field trip panel open --- lib/components/app/call-taker-panel.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/components/app/call-taker-panel.js b/lib/components/app/call-taker-panel.js index 5889c69d7..a0a1eafaf 100644 --- a/lib/components/app/call-taker-panel.js +++ b/lib/components/app/call-taker-panel.js @@ -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 !== @@ -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 @@ -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: