This commit is contained in:
Андрей Дувакин 2024-10-07 23:57:27 +05:00
parent e4ce32df2a
commit bd5ad2b7df
3 changed files with 12 additions and 5 deletions

View File

@ -99,7 +99,7 @@ const DeliveryOrdersList = ({
<div className="card-body"> <div className="card-body">
<p>Этап {index + 1}</p> <p>Этап {index + 1}</p>
<p> <p>
Расчетная длительность этапа:{" "} Расчетная длительность этапа:
{formatTimeInHours(order.estimated_route_time_in_minutes)} {formatTimeInHours(order.estimated_route_time_in_minutes)}
</p> </p>
{calculatingRoutes.includes(order.id) && ( {calculatingRoutes.includes(order.id) && (

View File

@ -19,7 +19,7 @@ const Header = () => {
<div className="container d-flex justify-content-between align-items-center"> <div className="container d-flex justify-content-between align-items-center">
<Link className="navbar-brand" to="/"> <Link className="navbar-brand" to="/">
<img <img
src="delivery-icon.png" src={`${process.env.PUBLIC_URL}/delivery-icon.png`}
alt="Логотип" alt="Логотип"
style={{ width: "60px", height: "60px", marginRight: "8px" }} style={{ width: "60px", height: "60px", marginRight: "8px" }}
/> />

View File

@ -4,9 +4,7 @@ import {
getDeliveryOrderDetails, getDeliveryOrderDetails,
updateDeliveryOrderRoute, updateDeliveryOrderRoute,
} from "../api.jsx"; } from "../api.jsx";
import { useParams } from "react-router-dom"; import { useParams, useNavigate } from "react-router-dom";
import { getCoordinates } from "../geocoder.jsx";
import { useNavigate } from "react-router-dom";
import { import {
MapContainer, MapContainer,
TileLayer, TileLayer,
@ -16,6 +14,7 @@ import {
} from "react-leaflet"; } from "react-leaflet";
import { DivIcon } from "leaflet"; import { DivIcon } from "leaflet";
import polyline from "@mapbox/polyline"; import polyline from "@mapbox/polyline";
import { getCoordinates } from "../geocoder.jsx";
import "./DeliveryOrderDetails.css"; import "./DeliveryOrderDetails.css";
const DELIVERY_CITY = { const DELIVERY_CITY = {
@ -110,6 +109,10 @@ const DeliveryOrderDetails = () => {
} }
}; };
const handleBack = () => {
navigate("/");
};
return ( return (
<div className="delivery-order-details"> <div className="delivery-order-details">
{loading ? ( {loading ? (
@ -118,6 +121,10 @@ const DeliveryOrderDetails = () => {
</div> </div>
) : ( ) : (
<div className="content-container"> <div className="content-container">
<button onClick={handleBack} className="btn btn-secondary mb-4">
Назад
</button>
<h2 style={{ textAlign: "center" }}>Общая информация</h2> <h2 style={{ textAlign: "center" }}>Общая информация</h2>
<table className="table table-bordered mb-5"> <table className="table table-bordered mb-5">
<thead> <thead>