File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ if (process.env.NODE_ENV === 'development') {
124124// set up the Redux store
125125const store = createStore (
126126 combineReducers ( {
127- callTaker : createCallTakerReducer ( ) ,
127+ callTaker : createCallTakerReducer ( otpConfig ) ,
128128 otp : createOtpReducer ( otpConfig ) ,
129129 user : createUserReducer ( ) ,
130130 router : connectRouter ( history )
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ export function endCall () {
6666 console . error ( err )
6767 alert ( `Could not save call: ${ JSON . stringify ( err ) } ` )
6868 } )
69+ // Clear itineraries shown when ending call.
70+ dispatch ( resetForm ( true ) )
6971 dispatch ( endingCall ( ) )
7072 }
7173}
Original file line number Diff line number Diff line change @@ -4,15 +4,18 @@ import moment from 'moment'
44import { constructNewCall } from '../util/call-taker'
55import { FETCH_STATUS } from '../util/constants'
66
7- function createCallTakerReducer ( ) {
7+ function createCallTakerReducer ( config ) {
8+ const calltakerConfig = config . modules . find ( m => m . id === 'call' )
89 const initialState = {
910 activeCall : null ,
1011 callHistory : {
1112 calls : {
1213 status : FETCH_STATUS . UNFETCHED ,
1314 data : [ ]
1415 } ,
15- visible : false
16+ visible : calltakerConfig &&
17+ calltakerConfig . options &&
18+ calltakerConfig . options . showCallHistoryOnLoad
1619 } ,
1720 fieldTrip : {
1821 activeId : null ,
You can’t perform that action at this time.
0 commit comments