[07f4e8b] | 1 | import React from "react";
|
---|
[e6c2521] | 2 | import { Container, Row, Modal, Im } from "react-bootstrap";
|
---|
| 3 | import { useState } from "react";
|
---|
| 4 | import { AiOutlinePlusCircle } from "react-icons/ai"
|
---|
| 5 | import AddHotelForm from "../Forms/AddHotelForm";
|
---|
| 6 | import AddRoomForm from "../Forms/AddRoomForm";
|
---|
| 7 | import AddRestaurantForm from "../Forms/AddRestaurantForm";
|
---|
| 8 | import AddTransportForm from "../Forms/AddTransportForm";
|
---|
| 9 | import AddItemMenuForm from "../Forms/AddItemMenuForm";
|
---|
| 10 | import AddRoomAvailablityForm from "../Forms/AddRoomAvailablityForm";
|
---|
| 11 | import AddTableAvailablityForm from "../Forms/AddTableAvailabilityForm";
|
---|
| 12 |
|
---|
| 13 | const 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 |
|
---|
| 54 | export default AddAvailability; |
---|