Changeset 5528b99 for frontend/src/Components/SearchCriterias
- Timestamp:
- 01/16/24 16:34:03 (11 months ago)
- Branches:
- master
- Children:
- 07f4e8b
- Parents:
- e6c2521
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/SearchCriterias/SearchCriteriasBar.js
re6c2521 r5528b99 2 2 import { Container, Form, Button, Row, Col } from "react-bootstrap"; 3 3 import useFormData from "../Hooks/useFormData"; 4 <<<<<<< HEAD 4 5 import SearchCriteriasHotel from "./SearchCriteriasHotel"; 5 6 import SearchCriteriasTransport from "./SearchCriteriasTransport"; 6 7 import SearchCriteriasRestaurant from "./SearchCriteriasRestaurant"; 8 ======= 9 >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl) 7 10 8 const SearchCriterias Bar= (props) => {11 const SearchCriterias = (props) => { 9 12 10 const { criterias, type } = props 13 const { formData, onFormChange, onCheckBoxChange, setFormData} = useFormData(props.criterias) 14 console.log("KRITERIUMI") 15 console.log(formData) 11 16 17 <<<<<<< HEAD 12 18 return ( 13 19 <> … … 18 24 ) 19 25 } 26 ======= 27 return ( 28 <> 29 <Container 30 className="p-1 pb-0 mb-5 mt-3 rounded-2" 31 style={{ backgroundColor: "#002B5B", width: "65%"}} 32 > 33 <Form className="rounded-5"> 34 <Row className="gx-1"> 35 <Col> 36 <Form.Floating className="mb-3"> 37 <Form.Control 38 size="md" 39 type="text" 40 placeholder="Каде ќе патувате?:" 41 id="location" 42 name="hotelLocation" 43 onChange={onFormChange} 44 value={formData.hotelLocation} 45 ></Form.Control> 46 <label htmlFor="location">Локација:</label> 47 </Form.Floating> 48 </Col> 49 <Col> 50 <Form.Floating className="mb-3"> 51 <Form.Control 52 size="md" 53 type="date" 54 placeholder="Датум на пристигнување:" 55 id="dateFrom" 56 name="dateFrom" 57 onChange={onFormChange} 58 value={formData.dateFrom} 59 ></Form.Control> 60 <label htmlFor="dateFrom">Датум на пристигнување:</label> 61 </Form.Floating> 62 </Col> 63 <Col> 64 <Form.Floating className="mb-3"> 65 <Form.Control 66 size="md" 67 type="date" 68 placeholder="Датум на заминување:" 69 id="dateTo" 70 name="dateTo" 71 onChange={onFormChange} 72 value={formData.dateTo} 73 ></Form.Control> 74 <label htmlFor="dateTo">Датум на заминување:</label> 75 </Form.Floating> 76 </Col> 77 <Col> 78 <Form.Floating className="mb-3"> 79 <Form.Control 80 size="md" 81 type="number" 82 placeholder="Број на гости:" 83 id="floatingPassengers" 84 name="numBeds" 85 onChange={onFormChange} 86 value={formData.numBeds} 87 ></Form.Control> 88 <label htmlFor="floatingPassengers">Број на гости:</label> 89 </Form.Floating> 90 </Col> 91 <Col> 92 <Form.Group className="my-1"> 93 <Button 94 type="submit" 95 style={{ backgroundColor: "#159895" }} 96 size="lg" 97 className="w-100" 98 onClick={(e) => { 99 e.preventDefault(); 100 window.location.href = `/search/hotel/${formData.hotelLocation}/${formData.dateFrom}/${formData.dateTo}/${formData.numBeds}` 101 }} 102 > 103 <span className="ikona mx-3">Пребарај</span> 104 </Button> 105 </Form.Group> 106 </Col> 107 </Row> 108 </Form> 109 </Container> 110 </> 111 ); 112 }; 113 >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl) 20 114 21 export default SearchCriterias Bar;115 export default SearchCriterias;
Note:
See TracChangeset
for help on using the changeset viewer.