@@ -90,11 +90,15 @@ function RoutingResult({
90
90
? new RouteInfo ( )
91
91
: getInfoFor ( path . points , path . details . mtb_rating , s => s > 1 )
92
92
93
- const privateOrDeliveryInfo = ApiImpl . isMotorVehicle ( profile )
93
+ const privateInfo = ApiImpl . isMotorVehicle ( profile )
94
+ ? getInfoFor ( path . points , path . details . road_access , s => s === 'private' )
95
+ : new RouteInfo ( )
96
+
97
+ const deliveryEtcInfo = ApiImpl . isMotorVehicle ( profile )
94
98
? getInfoFor (
95
99
path . points ,
96
100
path . details . road_access ,
97
- s => s === 'private ' || s === 'customers' || s === 'delivery '
101
+ s => s === 'delivery ' || s === 'customers' || s === 'destination '
98
102
)
99
103
: new RouteInfo ( )
100
104
const badTrackInfo = ! ApiImpl . isMotorVehicle ( profile )
@@ -125,7 +129,7 @@ function RoutingResult({
125
129
accessCondInfo . distance > 0 ||
126
130
footAccessCondInfo . distance > 0 ||
127
131
bikeAccessCondInfo . distance > 0 ||
128
- privateOrDeliveryInfo . distance > 0 ||
132
+ privateInfo . distance > 0 ||
129
133
trunkInfo . distance > 0 ||
130
134
badTrackInfo . distance > 0 ||
131
135
stepsInfo . distance > 0 ||
@@ -262,13 +266,26 @@ function RoutingResult({
262
266
type = { 'private' }
263
267
child = { < PrivateIcon /> }
264
268
value = {
265
- privateOrDeliveryInfo . distance > 0 &&
266
- metersToShortText ( privateOrDeliveryInfo . distance , showDistanceInMiles )
269
+ privateInfo . distance > 0 && metersToShortText ( privateInfo . distance , showDistanceInMiles )
267
270
}
268
271
selected = { selectedRH }
269
- segments = { privateOrDeliveryInfo . segments }
272
+ segments = { privateInfo . segments }
270
273
values = { [ ] }
271
274
/>
275
+ < RHButton
276
+ setDescription = { b => setDescriptionRH ( b ) }
277
+ description = { tr ( 'way_contains' , [ tr ( 'restricted_sections' ) ] ) }
278
+ setType = { t => setSelectedRH ( t ) }
279
+ type = { 'delivery_etc' }
280
+ child = { < PrivateIcon /> }
281
+ value = {
282
+ deliveryEtcInfo . distance > 0 &&
283
+ metersToShortText ( deliveryEtcInfo . distance , showDistanceInMiles )
284
+ }
285
+ selected = { selectedRH }
286
+ segments = { deliveryEtcInfo . segments }
287
+ values = { deliveryEtcInfo . values }
288
+ />
272
289
< RHButton
273
290
setDescription = { b => setDescriptionRH ( b ) }
274
291
description = { tr ( 'way_contains_toll' ) }
0 commit comments