[e9b4ba9] | 1 | import React from "react";
|
---|
| 2 | import { useState } from "react";
|
---|
| 3 | import { Col, Container, Row, Image, Modal, Button } from "react-bootstrap";
|
---|
| 4 | import LoginForm from "../Login/LoginForm";
|
---|
| 5 | import ChangePasswordForm from "../Forms/ChangePasswordForm";
|
---|
| 6 |
|
---|
| 7 | const ResourceListing = (props) => {
|
---|
| 8 |
|
---|
| 9 | console.log("props " + props.id)
|
---|
| 10 |
|
---|
| 11 |
|
---|
| 12 | const type = props.type == "hotel" ? "сместувањето" : props.type == "restaurant" ? "ресторанот" : "превозот";
|
---|
| 13 | const name = props.type == "hotel" ? props.data.hotelName : props.type == "restaurant" ? props.data.restaurantName : props.data.transportName
|
---|
| 14 | const id = props.type == "hotel" ? props.data.hotelId : props.type == "restaurant" ? props.data.resturantId : props.data.transportID
|
---|
| 15 | return(<>
|
---|
| 16 | <a href={`${props.type}/${id}`} style={{textDecoration: "none", color:"black"}}>
|
---|
| 17 | <Container className="py-3 px-1 my-4"
|
---|
| 18 | style={{
|
---|
| 19 | border: "4px solid #159895",
|
---|
| 20 | borderRadius: "1em",
|
---|
| 21 | boxShadow: "0 3px 5px #159895",
|
---|
| 22 | maxWidth: "90%",
|
---|
| 23 | }}>
|
---|
| 24 | <Row>
|
---|
| 25 | <Col className="d-flex justify-content-center">
|
---|
| 26 | <Image
|
---|
| 27 | src="https://www.imgacademy.com/sites/default/files/legacyhotel.jpg"
|
---|
| 28 | style={{
|
---|
| 29 | height: "8em",
|
---|
| 30 | borderRadius: "1em",
|
---|
| 31 | boxShadow: "0 4px 20px lightblue",
|
---|
| 32 | maxWidth: "100%",
|
---|
| 33 | }}
|
---|
| 34 | ></Image>
|
---|
| 35 | </Col>
|
---|
| 36 | <Col >
|
---|
| 37 | <h2 style={{textAlign: "left"}}>{name}</h2>
|
---|
| 38 | {props.type === "hotel" && (<>
|
---|
| 39 | <h5 style={{textAlign: "left"}}>{props.data.hotelLocation}</h5>
|
---|
| 40 | <h5 style={{textAlign: "left"}}>{props.data.hotelEmail}</h5>
|
---|
| 41 | </>)}
|
---|
| 42 | {props.type === "restaurant" && (<>
|
---|
| 43 | <h5 style={{textAlign: "left"}}>{props.data.restaurantLocation}</h5>
|
---|
| 44 | <h5 style={{textAlign: "left"}}>{props.data.cousineType} кујна</h5>
|
---|
| 45 | </>)}
|
---|
| 46 | {props.type === "transport" && (<>
|
---|
| 47 | <h5 style={{textAlign: "left"}}>{props.data.carBrand}</h5>
|
---|
| 48 | <h5 style={{textAlign: "left"}}>{props.data.carPlate}</h5>
|
---|
| 49 | </>)}
|
---|
| 50 | </Col>
|
---|
| 51 | <Col className="d-flex justify-content-center align-content-center" >
|
---|
| 52 | <span
|
---|
| 53 | style={{
|
---|
| 54 | backgroundColor: "#159895",
|
---|
| 55 | padding: "0.75em",
|
---|
| 56 | fontWeight: "bold",
|
---|
| 57 | fontSize: "1.8rem",
|
---|
| 58 | borderRadius: "0.75em",
|
---|
| 59 | color: "white",
|
---|
| 60 | margin: "auto"
|
---|
| 61 | }}
|
---|
| 62 | >
|
---|
| 63 | 9.1
|
---|
| 64 | </span>
|
---|
| 65 | </Col>
|
---|
| 66 | </Row>
|
---|
| 67 | </Container>
|
---|
| 68 | </a>
|
---|
| 69 | </>)
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | export default ResourceListing; |
---|