[e9b4ba9] | 1 | import React from "react";
|
---|
| 2 | import LoginForm from "../Components/Login/LoginForm";
|
---|
| 3 | import { Container, Row, Col, Form, Image, Button } from "react-bootstrap";
|
---|
| 4 | import Navigation from "../Components/Layout/Navbar/Navigation";
|
---|
| 5 | import Carousel from "react-bootstrap/Carousel";
|
---|
| 6 | import { useState } from "react";
|
---|
| 7 | import DescriptionContainer from "../Components/HotelDetails/DescriptionContainer";
|
---|
| 8 | import ReviewsCarousel from "../Components/HotelDetails/ReviewsCarousel";
|
---|
| 9 | import RoomsTable from "../Components/HotelDetails/RoomsTable";
|
---|
| 10 | import ContactBar from "../Components/HotelDetails/ContactBar";
|
---|
| 11 | import RouteContainer from "../Components/TransportDetails/RouteContainer";
|
---|
| 12 | import { useLocation } from "react-router-dom";
|
---|
| 13 |
|
---|
| 14 | const TransportDetailsPage = (props) => {
|
---|
| 15 | document.body.style.backgroundColor = "white";
|
---|
| 16 |
|
---|
| 17 | const [index, setIndex] = useState(0);
|
---|
| 18 |
|
---|
| 19 | const location = useLocation();
|
---|
| 20 | const { data } = location.state;
|
---|
| 21 |
|
---|
| 22 | const handleSelect = (selectedIndex) => {
|
---|
| 23 | setIndex(selectedIndex);
|
---|
| 24 | };
|
---|
| 25 |
|
---|
| 26 | return (
|
---|
| 27 | <>
|
---|
| 28 | <Navigation />
|
---|
| 29 | <Container className="my-3">
|
---|
| 30 | <Row className="d-flex justify-content-between">
|
---|
| 31 | <Col style={{textAlign: "left"}}>
|
---|
| 32 | <span><h2 style={{color: "#159895"}}>{data.from} - {data.to}</h2><h5 style={{color: "#159895"}}>({data.routes.join(", ")})</h5></span>
|
---|
| 33 | </Col>
|
---|
| 34 | <Col>
|
---|
| 35 | <Container>
|
---|
| 36 | <Row className="mb-4">
|
---|
| 37 | <Col style={{textAlign: "right"}}>
|
---|
| 38 | <span
|
---|
| 39 | style={{
|
---|
| 40 | backgroundColor: "#159895",
|
---|
| 41 | padding: "0.75em",
|
---|
| 42 | fontWeight: "bold",
|
---|
| 43 | fontSize: "1.25rem",
|
---|
| 44 | borderRadius: "0.75em",
|
---|
| 45 | color: "white",
|
---|
| 46 | }}
|
---|
| 47 | >
|
---|
| 48 | 9.1
|
---|
| 49 | </span>
|
---|
| 50 | </Col>
|
---|
| 51 | </Row>
|
---|
| 52 | </Container>
|
---|
| 53 | </Col>
|
---|
| 54 | </Row>
|
---|
| 55 | <Row>
|
---|
| 56 | <RouteContainer data={data}></RouteContainer>
|
---|
| 57 | </Row>
|
---|
| 58 | <hr></hr>
|
---|
| 59 | <Row>
|
---|
| 60 | <Col>
|
---|
| 61 | <h3>Цена</h3>
|
---|
| 62 | </Col>
|
---|
| 63 | <Col>
|
---|
| 64 | <h3>{data.price}$</h3>
|
---|
| 65 | </Col>
|
---|
| 66 | </Row>
|
---|
| 67 | <hr></hr>
|
---|
| 68 | <Row>
|
---|
| 69 | <Col className="d-flex flex-column justify-content-center">
|
---|
| 70 | <h3>Возач</h3>
|
---|
| 71 | </Col>
|
---|
| 72 | <Col className="d-flex flex-column justify-content-center">
|
---|
| 73 | <Container className="d-flex flex-row justify-content-center mb-3" style={{paddingLeft: "28%"}}>
|
---|
| 74 | <Col className="d-flex flex-column justify-content-center" style={{maxWidth: "30%"}}>
|
---|
| 75 | <Image
|
---|
| 76 | src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg"
|
---|
| 77 | style={{
|
---|
| 78 | height: "4em",
|
---|
| 79 | borderRadius: "50%",
|
---|
| 80 | maxWidth: "100%",
|
---|
| 81 | }}
|
---|
| 82 | className="m-auto"
|
---|
| 83 | ></Image>
|
---|
| 84 | </Col>
|
---|
| 85 | <Col className="d-flex flex-column justify-content-center">
|
---|
| 86 | <Container className="pt-2" style={{ textAlign: "left" }}>
|
---|
| 87 | <h4>{data.transport.owner.name} {data.transport.owner.surname.substring(0, 1)}.</h4>
|
---|
| 88 | </Container>
|
---|
| 89 | </Col>
|
---|
| 90 | </Container>
|
---|
| 91 | </Col>
|
---|
| 92 | </Row>
|
---|
| 93 | <hr></hr>
|
---|
| 94 | <Row>
|
---|
| 95 | <Col>
|
---|
| 96 | <h3>Возило</h3>
|
---|
| 97 | </Col>
|
---|
| 98 | <Col>
|
---|
| 99 | <h3>{data.transport.carBrand + " " + data.transport.carType}</h3>
|
---|
| 100 | </Col>
|
---|
| 101 | </Row>
|
---|
| 102 | <hr></hr>
|
---|
| 103 | <Row>
|
---|
| 104 | <Col className="d-flex flex-column justify-content-center">
|
---|
| 105 | <h3>Број на патници</h3>
|
---|
| 106 | </Col>
|
---|
| 107 | <Col md="auto" className="d-flex flex-column justify-content-center">
|
---|
| 108 | <Form.Select aria-label="Default select example">
|
---|
| 109 | <option></option>
|
---|
| 110 | <option value="1">1</option>
|
---|
| 111 | <option value="2">2</option>
|
---|
| 112 | <option value="3">3</option>
|
---|
| 113 | </Form.Select>
|
---|
| 114 | </Col>
|
---|
| 115 | <Col >
|
---|
| 116 | <Button className="m-2" size="lg" style={{backgroundColor: "#159895"}}>Резервирај</Button>
|
---|
| 117 | </Col>
|
---|
| 118 | </Row>
|
---|
| 119 | <Row><ContactBar></ContactBar></Row>
|
---|
| 120 | </Container>
|
---|
| 121 | </>
|
---|
| 122 | );
|
---|
| 123 | };
|
---|
| 124 |
|
---|
| 125 | export default TransportDetailsPage;
|
---|