diff --git a/src/pages/DeliveryOrderDetails.css b/src/pages/DeliveryOrderDetails.css new file mode 100644 index 0000000..5f28596 --- /dev/null +++ b/src/pages/DeliveryOrderDetails.css @@ -0,0 +1,35 @@ +.delivery-order-details { + display: flex; + flex-direction: column; + align-items: center; + padding: 20px; +} + +.content-container { + max-width: 800px; + width: 100%; + text-align: left; +} + +.city-list { + list-style-type: decimal; + padding: 0; + margin-bottom: 20px; +} + +.city-item { + margin: 10px 0; + font-size: 16px; +} + +.city-info { + display: block; + font-size: 14px; + color: #555; +} + +.map-container { + width: 100%; + max-width: 800px; + margin: 0 auto; +} \ No newline at end of file diff --git a/src/pages/DeliveryOrderDetails.jsx b/src/pages/DeliveryOrderDetails.jsx index a7129f5..f1b840c 100644 --- a/src/pages/DeliveryOrderDetails.jsx +++ b/src/pages/DeliveryOrderDetails.jsx @@ -10,6 +10,7 @@ import { Polyline, } from "react-leaflet"; import polyline from "@mapbox/polyline"; +import "./DeliveryOrderDetails.css"; const DeliveryOrderDetails = () => { const { id: deliveryOrderId } = useParams(); @@ -58,50 +59,56 @@ const DeliveryOrderDetails = () => { }; return ( -
+
{loading ? (
- Загрузка доставок... + Загрузка...
) : ( -
-
    +
    +
      {deliveryAccessories.map((accessory) => { const coord = coordinates.find( (c) => c.city === accessory.city_name ); return ( -
    1. - Доставка: {accessory.name} (Город: {accessory.city_name}, - Координаты:{" "} - {coord - ? `${coord.latitude}, ${coord.longitude}` - : "Не найдены"} - ) +
    2. + Доставка: {accessory.name} + + (Город: {accessory.city_name}, Координаты:{" "} + {coord + ? `${coord.latitude}, ${coord.longitude}` + : "Не найдены"} + ) +
    3. ); })} -
+ {coordinates.length > 0 && ( - - - {coordinates.map((coord, index) => ( - - {coord.city} - - ))} - {route.length > 0 && } - +
+ + + {coordinates.map((coord, index) => ( + + {coord.city} + + ))} + {route.length > 0 && ( + + )} + +
)}
)}