[e6c2521] | 1 | import React, {useState} from "react";
|
---|
| 2 | import {Container, Nav, Tabs} from "react-bootstrap";
|
---|
| 3 | import {Tab} from "react-bootstrap";
|
---|
| 4 | import {FaHotel, FaTaxi} from 'react-icons/fa'
|
---|
| 5 | import {MdRestaurant} from "react-icons/md"
|
---|
| 6 | import HotelReservationListing from "./HotelReservationListing";
|
---|
| 7 | import UnapprovedBusinessesTable from "../AdminPanel/UnapprovedBusinessesTable";
|
---|
| 8 | import UnapprovedProfilesTable from "../AdminPanel/UnapprovedProfilesTable";
|
---|
| 9 | import AllProfilesTable from "../AdminPanel/AllProfilesTable";
|
---|
| 10 | import useGet from "../Hooks/useGet";
|
---|
| 11 | import ActiveHotelReservations from "./ActiveHotelReservations";
|
---|
| 12 | import PastHotelReservations from "./PastHotelReservations";
|
---|
| 13 | import ActiveRestaurantReservations from "./ActiveRestaurantReservations";
|
---|
| 14 | import PastRestaurantReservations from "./PastRestaurantReservations";
|
---|
| 15 | import ActiveTransportReservations from "./ActiveTransportReservations";
|
---|
| 16 | import PastTransportReservations from "./PastTransportReservations";
|
---|
| 17 |
|
---|
| 18 | function TypeSelectionTab() {
|
---|
| 19 | const [activeTab, setActiveTab] = useState("/hotel");
|
---|
| 20 | const handleSelect = (eventKey) => {
|
---|
| 21 | setActiveTab(eventKey);
|
---|
| 22 | };
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | return (
|
---|
| 26 | <Container className='rounded-5'>
|
---|
| 27 | <Tab.Container
|
---|
| 28 | activeKey={activeTab}
|
---|
| 29 | onSelect={handleSelect}
|
---|
| 30 | className="bg-dark rounded-5"
|
---|
| 31 | >
|
---|
| 32 | <Nav
|
---|
| 33 | fill
|
---|
| 34 | variant="tabs"
|
---|
| 35 | className="bg-body rounded-top-5"
|
---|
| 36 | activeKey="/hotel"
|
---|
| 37 | id="tab_item"
|
---|
| 38 | >
|
---|
| 39 | <Nav.Item className="tab_item rounded-5">
|
---|
| 40 | <Nav.Link eventKey="/hotel" className="text-left rounded-5">
|
---|
| 41 | <span className="ikona"><FaHotel color="#159895" style={{lineHeight: "100em"}}
|
---|
| 42 | size={"1.5em"} className="mx-3"/></span>
|
---|
| 43 | <span className="ikona">Сместување</span>
|
---|
| 44 | </Nav.Link>
|
---|
| 45 | </Nav.Item>
|
---|
| 46 | <Nav.Item className="tab_item">
|
---|
| 47 | <Nav.Link eventKey="/restaurant">
|
---|
| 48 | <span className="ikona"><MdRestaurant color="#159895" size={"1.5em"}
|
---|
| 49 | className="mx-3"/></span><
|
---|
| 50 | span className="ikona">Ресторан</span>
|
---|
| 51 | </Nav.Link>
|
---|
| 52 | </Nav.Item>
|
---|
| 53 | <Nav.Item className="tab_item rounded-5">
|
---|
| 54 | <Nav.Link eventKey="/transport" className="text-left rounded-5"><span className="ikona"><FaTaxi
|
---|
| 55 | color="#159895" size={"1.5em"} className="mx-3"/></span>
|
---|
| 56 | <span className="ikona">Превоз</span>
|
---|
| 57 | </Nav.Link>
|
---|
| 58 | </Nav.Item>
|
---|
| 59 | </Nav>
|
---|
| 60 |
|
---|
| 61 | <Tab.Content className="py-5 px-3 border rounded-bottom-5 bg-light">
|
---|
| 62 | <Tab.Pane eventKey="/hotel">
|
---|
| 63 | <Container>
|
---|
| 64 | <Tabs
|
---|
| 65 | fill
|
---|
| 66 | defaultActiveKey="home"
|
---|
| 67 | id="uncontrolled-tab-example"
|
---|
| 68 | className="mb-3"
|
---|
| 69 | >
|
---|
| 70 | <Tab eventKey="home" title="Активни резервации">
|
---|
| 71 | <ActiveHotelReservations></ActiveHotelReservations>
|
---|
| 72 | </Tab>
|
---|
| 73 | <Tab eventKey="profile" title="Претходни резервации">
|
---|
| 74 | <PastHotelReservations></PastHotelReservations>
|
---|
| 75 | </Tab>
|
---|
| 76 | </Tabs>
|
---|
| 77 | </Container>
|
---|
| 78 | </Tab.Pane>
|
---|
| 79 | <Tab.Pane eventKey="/restaurant">
|
---|
| 80 | <Tabs
|
---|
| 81 | fill
|
---|
| 82 | defaultActiveKey="home"
|
---|
| 83 | id="uncontrolled-tab-example"
|
---|
| 84 | className="mb-3"
|
---|
| 85 | >
|
---|
| 86 | <Tab eventKey="home" title="Активни резервации">
|
---|
| 87 | <ActiveRestaurantReservations></ActiveRestaurantReservations>
|
---|
| 88 | </Tab>
|
---|
| 89 | <Tab eventKey="profile" title="Претходни резервации">
|
---|
| 90 | <PastRestaurantReservations></PastRestaurantReservations>
|
---|
| 91 | </Tab>
|
---|
| 92 | </Tabs>
|
---|
| 93 | </Tab.Pane>
|
---|
| 94 | <Tab.Pane eventKey="/transport">
|
---|
| 95 | <Tabs
|
---|
| 96 | fill
|
---|
| 97 | defaultActiveKey="home"
|
---|
| 98 | id="uncontrolled-tab-example"
|
---|
| 99 | className="mb-3"
|
---|
| 100 | >
|
---|
| 101 | <Tab eventKey="home" title="Активни резервации">
|
---|
| 102 | <ActiveTransportReservations></ActiveTransportReservations>
|
---|
| 103 | </Tab>
|
---|
| 104 | <Tab eventKey="profile" title="Претходни резервации">
|
---|
| 105 | <PastTransportReservations></PastTransportReservations>
|
---|
| 106 | </Tab>
|
---|
| 107 | </Tabs>
|
---|
| 108 | </Tab.Pane>
|
---|
| 109 | </Tab.Content>
|
---|
| 110 | </Tab.Container>
|
---|
| 111 | </Container>
|
---|
| 112 | );
|
---|
| 113 | }
|
---|
| 114 |
|
---|
| 115 | export default TypeSelectionTab;
|
---|