._.
This commit is contained in:
parent
2380c63f6a
commit
e7012d697d
@ -99,10 +99,26 @@ const DeliveryOrderDetails = () => {
|
|||||||
city: accessory.city_name,
|
city: accessory.city_name,
|
||||||
latitude: accessory.latitude,
|
latitude: accessory.latitude,
|
||||||
longitude: accessory.longitude,
|
longitude: accessory.longitude,
|
||||||
|
accessory_name:
|
||||||
|
accessory.accessory_name +
|
||||||
|
Math.round(
|
||||||
|
(accessory.accessory_volume * accessory.count) / 100
|
||||||
|
) +
|
||||||
|
"шт.",
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
const coords = await getCoordinates(accessory.city_name);
|
const coords = await getCoordinates(accessory.city_name);
|
||||||
return { city: accessory.city_name, ...coords };
|
return {
|
||||||
|
city: accessory.city_name,
|
||||||
|
accessory_name:
|
||||||
|
accessory.accessory_name +
|
||||||
|
": " +
|
||||||
|
Math.round(
|
||||||
|
(accessory.accessory_volume * accessory.count) / 100
|
||||||
|
) +
|
||||||
|
"шт.",
|
||||||
|
...coords,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -195,7 +211,9 @@ const DeliveryOrderDetails = () => {
|
|||||||
const { days, hours, minutes } = formatDuration(
|
const { days, hours, minutes } = formatDuration(
|
||||||
deliveryOrder?.estimated_route_time_in_minutes
|
deliveryOrder?.estimated_route_time_in_minutes
|
||||||
);
|
);
|
||||||
return `${days} дн. ${hours} ч.`;
|
return days > 0
|
||||||
|
? `${days} дн. ${hours} ч.`
|
||||||
|
: `${hours} ч.`;
|
||||||
})()}
|
})()}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -258,7 +276,11 @@ const DeliveryOrderDetails = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Popup>{coord.city}</Popup>
|
<Popup>
|
||||||
|
{coord.city}
|
||||||
|
<br />
|
||||||
|
{coord.accessory_name}
|
||||||
|
</Popup>
|
||||||
</Marker>
|
</Marker>
|
||||||
))}
|
))}
|
||||||
<Marker
|
<Marker
|
||||||
@ -273,7 +295,11 @@ const DeliveryOrderDetails = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Popup>{DELIVERY_CITY.name}</Popup>
|
<Popup>
|
||||||
|
{DELIVERY_CITY.name}
|
||||||
|
<br />
|
||||||
|
Конечный пункт
|
||||||
|
</Popup>
|
||||||
</Marker>
|
</Marker>
|
||||||
{route.length > 0 && (
|
{route.length > 0 && (
|
||||||
<Polyline positions={route} color="blue" />
|
<Polyline positions={route} color="blue" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user