source: frontend/src/Pages/HotelDetailsPage.js@ ac19a0c

Last change on this file since ac19a0c was ac19a0c, checked in by darsov2 <62809499+darsov2@…>, 6 months ago

authContext impl, admin panel impl, search bar fixes, reservations listings impl

  • Property mode set to 100644
File size: 5.8 KB
Line 
1import React from "react";
2import LoginForm from "../Components/Login/LoginForm";
3import {Container, Row, Col, Form, FloatingLabel} from "react-bootstrap";
4import Navigation from "../Components/Layout/Navbar/Navigation";
5import Carousel from "react-bootstrap/Carousel";
6import { useState } from "react";
7import DescriptionContainer from "../Components/HotelDetails/DescriptionContainer";
8import ReviewsCarousel from "../Components/HotelDetails/ReviewsCarousel";
9import RoomsTable from "../Components/HotelDetails/RoomsTable";
10import ContactBar from "../Components/HotelDetails/ContactBar";
11import { useLocation } from "react-router-dom";
12
13const HotelDetailsPage = (props) => {
14 document.body.style.backgroundColor = "white";
15
16 const [index, setIndex] = useState(0);
17
18 const location = useLocation();
19 const { data, from, to } = location.state;
20 console.log(location)
21 console.log("DETAILS ")
22 console.log(data)
23
24 const handleSelect = (selectedIndex) => {
25 setIndex(selectedIndex);
26 };
27
28 return (
29 <>
30 <Navigation />
31 <Container className="my-3">
32 <Row className="d-flex justify-content-between">
33 <Col style={{textAlign: "left"}}>
34 <h2 style={{color: "#159895"}}>{data.hotelName}</h2>
35 </Col>
36 <Col>
37 <Container>
38 <Row className="mb-4">
39 <Col style={{textAlign: "right"}}>
40 <span
41 style={{
42 backgroundColor: "#159895",
43 padding: "0.75em",
44 fontWeight: "bold",
45 fontSize: "1.25rem",
46 borderRadius: "0.75em",
47 color: "white",
48 }}
49 >
50 9.1
51 </span>
52 </Col>
53 </Row>
54 </Container>
55 </Col>
56 </Row>
57 <Row>
58 <Col
59 className="p-3 rounded-4"
60 sm={3}
61 style={{ backgroundColor: "#002B5B" }}
62 >
63 <Row>
64 <h3 className="mb-5 mt-3" style={{color: "white"}}>Критериуми од пребарувањето</h3>
65 <Form.Floating className="mb-3">
66 <Form.Control
67 size="md"
68 type="text"
69 placeholder="Каде ќе патувате?:"
70 id="location"
71 value={data.hotelLocation}
72 ></Form.Control>
73 <label style={{left: "10px"}} htmlFor="location">Локација:</label>
74 </Form.Floating>
75 </Row>
76 <Row>
77 <Form.Floating className="mb-3">
78 <Form.Control
79 size="md"
80 type="date"
81 placeholder="Датум на пристигнување:"
82 id="dateFrom"
83 value={from}
84 ></Form.Control>
85 <label style={{left: "10px"}} htmlFor="dateFrom">Датум на пристигнување:</label>
86 </Form.Floating>
87 </Row>
88 <Row>
89 <Form.Floating className="mb-3">
90 <Form.Control
91 size="md"
92 type="date"
93 placeholder="Датум на заминување:"
94 id="dateTo"
95 value={to}
96 ></Form.Control>
97 <label style={{left: "10px"}} htmlFor="dateTo">Датум на заминување:</label>
98 </Form.Floating>
99 </Row>
100 <Row>
101 <Form.Floating className="mb-3">
102 <Form.Control
103 size="md"
104 type="number"
105 placeholder="Број на гости:"
106 id="floatingPassengers"
107 ></Form.Control>
108 <label style={{left: "10px"}} htmlFor="floatingPassengers">Број на гости:</label>
109 </Form.Floating>
110 </Row>
111 </Col>
112 <Col>
113 <Container>
114 <Row>
115 <Carousel activeIndex={index} onSelect={handleSelect}>
116 <Carousel.Item>
117 <img
118 className="d-block w-100 h-400 rounded-5"
119 src="https://www.kovz.gov.mk/articleImage.img/2022/08/05/JPG_010_-_Jovan_Kaneo_church_in_Ohrid__panorama-min.jpg"
120 alt="First slide"
121 style={{ height: "50vh" }}
122 />
123 </Carousel.Item>
124 <Carousel.Item>
125 <img
126 className="d-block w-100 rounded-5"
127 src="https://macedonia-timeless.com/wp-content/uploads/2018/08/dojran-ezero.jpg"
128 alt="Second slide"
129 style={{ height: "50vh" }}
130 />
131 </Carousel.Item>
132 <Carousel.Item>
133 <img
134 className="d-block w-100 rounded-5"
135 src="https://i.imgur.com/NFlxbqY.jpg"
136 alt="Third slide"
137 style={{ height: "50vh" }}
138 />
139 </Carousel.Item>
140 </Carousel>
141 </Row>
142 <Row>
143 <Container></Container>
144 </Row>
145 </Container>
146 </Col>
147 </Row>
148 <Row className="mb-5">
149 <Col className="col-md-8"><DescriptionContainer data={data.hotelDescripiton} type="hotel"></DescriptionContainer></Col>
150 <Col className="col-md-4"><ReviewsCarousel></ReviewsCarousel></Col>
151 </Row>
152 <Row className="mb-3"><RoomsTable from={from} to={to} data={data.hotelRooms}></RoomsTable></Row>
153 <Row><ContactBar></ContactBar></Row>
154 </Container>
155 </>
156 );
157};
158
159export default HotelDetailsPage;
Note: See TracBrowser for help on using the repository browser.