._.
This commit is contained in:
parent
3f43b5d1c9
commit
e4ce32df2a
@ -44,7 +44,7 @@ const DeliveryOrderDetails = () => {
|
|||||||
const deliveryOrderDetails = await getDeliveryOrderDetails(
|
const deliveryOrderDetails = await getDeliveryOrderDetails(
|
||||||
deliveryOrderId
|
deliveryOrderId
|
||||||
);
|
);
|
||||||
setTotalCost(Math.round(deliveryOrderDetails.price)); // Округление стоимости до целого
|
setTotalCost(Math.round(deliveryOrderDetails.price));
|
||||||
setTruckCount(deliveryOrderDetails.count_trucks);
|
setTruckCount(deliveryOrderDetails.count_trucks);
|
||||||
setTruckName(deliveryOrderDetails.truck_name);
|
setTruckName(deliveryOrderDetails.truck_name);
|
||||||
|
|
||||||
@ -114,10 +114,11 @@ const DeliveryOrderDetails = () => {
|
|||||||
<div className="delivery-order-details">
|
<div className="delivery-order-details">
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div className="spinner-border" role="status">
|
<div className="spinner-border" role="status">
|
||||||
<span className="visually-hidden">Загрузка</span>
|
<span className="visually-hidden"></span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="content-container">
|
<div className="content-container">
|
||||||
|
<h2 style={{ textAlign: "center" }}>Общая информация</h2>
|
||||||
<table className="table table-bordered mb-5">
|
<table className="table table-bordered mb-5">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -135,8 +136,9 @@ const DeliveryOrderDetails = () => {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3 className="mb-3">Маршрут</h3>
|
<h2 style={{ textAlign: "center" }}>Маршрут</h2>
|
||||||
<table className="table table-bordered">
|
|
||||||
|
<table className="table table-bordered mb-5">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Город</th>
|
<th scope="col">Город</th>
|
||||||
@ -146,24 +148,17 @@ const DeliveryOrderDetails = () => {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{deliveryAccessories.map((accessory, index) => {
|
{deliveryAccessories.map((accessory) => (
|
||||||
const coord = coordinates.find(
|
<tr key={accessory.id}>
|
||||||
(c) => c.city === accessory.city_name
|
<td>{accessory.city_name}</td>
|
||||||
);
|
<td>{accessory.accessory_name}</td>
|
||||||
return (
|
<td>{accessory.count}</td>
|
||||||
<tr key={index}>
|
<td>{accessory.volume}</td>
|
||||||
<td>{accessory.city_name}</td>
|
</tr>
|
||||||
<td>{accessory.accessory_name}</td>
|
))}
|
||||||
<td>{accessory.count}</td>
|
|
||||||
<td>{accessory.volume}</td>
|
|
||||||
</tr>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{DELIVERY_CITY.name}</td>
|
<td>{DELIVERY_CITY.name}</td>
|
||||||
<td>Конечный пункт</td>
|
<td colSpan="3">Конечный пункт</td>
|
||||||
<td>-</td>
|
|
||||||
<td>-</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user