source: frontend/src/Components/Resources/AddAvailability.js@ 07f4e8b

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

prefinal fixes

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[07f4e8b]1 import React from "react";
[e6c2521]2import { Container, Row, Modal, Im } from "react-bootstrap";
3import { useState } from "react";
4import { AiOutlinePlusCircle } from "react-icons/ai"
5import AddHotelForm from "../Forms/AddHotelForm";
6import AddRoomForm from "../Forms/AddRoomForm";
7import AddRestaurantForm from "../Forms/AddRestaurantForm";
8import AddTransportForm from "../Forms/AddTransportForm";
9import AddItemMenuForm from "../Forms/AddItemMenuForm";
10import AddRoomAvailablityForm from "../Forms/AddRoomAvailablityForm";
11import AddTableAvailablityForm from "../Forms/AddTableAvailabilityForm";
12
13const AddAvailability = (props) => {
14
15 const [show, setShow] = useState(false);
16
17 const handleClose = () => setShow(false);
18 const handleShow = (e) => {
19 e.preventDefault();
20 setShow(true);
21
22 };
23
24
25 return(<>
26 <Container onClick={handleShow}>
27 <h5>Додади<br/>расположливост</h5>
28 <div className="d-flex justify-content-center align-content-center"><AiOutlinePlusCircle size={50} color="#159895"></AiOutlinePlusCircle></div>
29
30 </Container>
31
32 <Modal show={show} onHide={handleClose}>
33 <Modal.Header closeButton>
34 <Modal.Title style={{ color: "#159895" }}>
35 {props.type === "hotel" && "Додавање на хотел"}
36 {props.type === "room" && "Додавање на расположливост за соба"}
37 {props.type === "restaurant" && "Додавање на ресторант"}
38 {props.type === "transport" && "Додавање на транспорт"}
39 {props.type === "menu" && "Додавање на ставка во мени"}
40 </Modal.Title>
41 </Modal.Header>
42 <Modal.Body>
43 {props.type === "hotel" && <AddHotelForm/>}
[07f4e8b]44 {props.type === "room" && <AddRoomAvailablityForm refresh={props.refresh} close={props.closeModal} hotelRoomId={props.hotelRoomId}/>}
45 {props.type === "table" && <AddTableAvailablityForm refresh={props.refresh} close={props.closeModal} table={props.table}/>}
[e6c2521]46 {props.type === "restaurant" && <AddRestaurantForm/>}
47 {props.type === "transport" && <AddTransportForm/>}
48 {props.type === "menu" && <AddItemMenuForm/>}
49 </Modal.Body>
50 </Modal>
51 </>)
52}
53
54export default AddAvailability;
Note: See TracBrowser for help on using the repository browser.