- Timestamp:
- 01/24/24 17:42:28 (8 months ago)
- Branches:
- master
- Children:
- 0f5aa27
- Parents:
- 5528b99
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/UserPanel/HotelReservationListing.js
r5528b99 r07f4e8b 12 12 import data from "bootstrap/js/src/dom/data"; 13 13 import {AiOutlinePlusCircle} from "react-icons/ai"; 14 import {MdOutlineRateReview} from "react-icons/md"; 14 import { MdCancel } from "react-icons/md"; 15 import { MdOutlineRateReview } from "react-icons/md" 15 16 import useFormData from "../Hooks/useFormData"; 16 17 import useCreate from "../Hooks/useCreate"; … … 26 27 27 28 console.log(props.data) 29 const { createEntity } = useCreate(); 28 30 const dateFormatter = (str) => { 29 31 const inputDate = new Date(str); … … 114 116 <h3>Вкупна цена: <br></br>{props.data.transportRoute.price}$</h3> 115 117 </Col>} 118 {(!props.past) && <Col className="d-flex flex-column justify-content-center align-content-center"> 119 {<Container id={'ocn'} onClick={(e) => { 120 console.log(e.target) 121 if (e.target.id === 'icon') { 122 createEntity(`/restaurant/${props.data.reservationId}/cancel`, props.setChanged, props.setChanged) 123 window.location.href="/reservations" 124 } 125 }}> 126 <h5 id={'icon'}>Откажи<br/>резервација</h5> 127 <div className="d-flex justify-content-center align-content-center"> 128 <MdCancel size={50} color="#159895"/></div> 129 130 </Container>} 131 </Col>} 116 132 {(props.past) && <Col className="d-flex flex-column justify-content-center align-content-center"> 117 133 {!props.data.reviewed && <Container id={'ocn'} onClick={(e) => { … … 132 148 </Row> 133 149 </Container> 134 {props.type === 'hotel' && <HotelReservationModal s how={show} handleClose={handleClose} data={props.data}/>}135 <ReviewModal type={props.type} showReview={showReview} handleCloseReview={handleCloseReview} data={props.data}/>150 {props.type === 'hotel' && <HotelReservationModal setChanged={props.setChanged} show={show} handleClose={handleClose} data={props.data}/>} 151 <ReviewModal setChanged={props.setChanged} type={props.type} showReview={showReview} handleCloseReview={handleCloseReview} data={props.data}/> 136 152 </>) 137 153 }
Note:
See TracChangeset
for help on using the changeset viewer.