This commit is contained in:
Андрей Дувакин 2024-10-08 10:05:00 +05:00
parent f7301f9635
commit 644653c08d
3 changed files with 73 additions and 75 deletions

View File

@ -566,10 +566,6 @@ export const updateDeliveryOrderRoute = async (
estimatedRouteTime, estimatedRouteTime,
route route
) => { ) => {
console.log({
estimated_route_time_in_minutes: estimatedRouteTime,
route: route,
});
try { try {
const response = await axios.put( const response = await axios.put(
`${API_URL}/delivery-orders/${deliveryOrderId}/route`, `${API_URL}/delivery-orders/${deliveryOrderId}/route`,

View File

@ -128,9 +128,9 @@ const DeliveryOrdersList = ({
}) })
); );
fetchDeliveryOrders(); await fetchDeliveryOrders();
}; setCalculatingRoutes([]);
};
const ordersToCalculate = deliveryOrders.filter( const ordersToCalculate = deliveryOrders.filter(
(order) => !order.estimated_route_time_in_minutes (order) => !order.estimated_route_time_in_minutes

View File

@ -124,6 +124,7 @@ const Home = () => {
<th>Статус</th> <th>Статус</th>
<th>Количество роботов</th> <th>Количество роботов</th>
<th>Количество этапов</th> <th>Количество этапов</th>
<th>Итоговая цена</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -131,6 +132,7 @@ const Home = () => {
<td>{order.status_name || "Неизвестный статус"}</td> <td>{order.status_name || "Неизвестный статус"}</td>
<td>{order.count_robots}</td> <td>{order.count_robots}</td>
<td>{deliveryOrdersCount || 0}</td> <td>{deliveryOrdersCount || 0}</td>
<td>{order.price || 0} руб.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>