@@ -5,9 +5,9 @@ import { connect } from 'react-redux'
5
5
6
6
import * as fieldTripActions from '../../actions/field-trip'
7
7
import * as formActions from '../../actions/form'
8
- import Icon from '../narrative/icon'
9
8
import { getTripFromRequest } from '../../util/call-taker'
10
9
10
+ import FieldTripStatusIcon from './field-trip-status-icon'
11
11
import {
12
12
Bold ,
13
13
Button ,
@@ -47,13 +47,11 @@ class TripStatus extends Component {
47
47
viewRequestTripItineraries ( request , outbound )
48
48
}
49
49
50
- _renderStatusIcon = ( ) => this . props . status
51
- ? < Icon className = 'text-success' type = 'check' />
52
- : < Icon className = 'text-warning' type = 'exclamation-circle' />
50
+ _tripIsPlanned = ( ) => this . props . status && this . props . trip
53
51
54
52
_renderTripStatus = ( ) => {
55
- const { status , trip } = this . props
56
- if ( ! status || ! trip ) {
53
+ const { trip } = this . props
54
+ if ( ! this . _tripIsPlanned ( ) ) {
57
55
return (
58
56
< Para >
59
57
No itineraries planned! Click Plan to plan trip.
@@ -92,7 +90,7 @@ class TripStatus extends Component {
92
90
return (
93
91
< Full >
94
92
< Header >
95
- { this . _renderStatusIcon ( ) }
93
+ < FieldTripStatusIcon status = { this . _tripIsPlanned ( ) } />
96
94
{ outbound ? 'Outbound' : 'Inbound' } trip
97
95
< Button bsSize = 'xs' onClick = { this . _onPlanTrip } > Plan</ Button >
98
96
< Button
0 commit comments