Ignore:
Timestamp:
01/24/24 17:42:28 (8 months ago)
Author:
darsov2 <62809499+darsov2@…>
Branches:
master
Children:
0f5aa27
Parents:
5528b99
Message:

prefinal fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/Components/UserPanel/HotelReservationListing.js

    r5528b99 r07f4e8b  
    1212import data from "bootstrap/js/src/dom/data";
    1313import {AiOutlinePlusCircle} from "react-icons/ai";
    14 import {MdOutlineRateReview} from "react-icons/md";
     14import { MdCancel } from "react-icons/md";
     15import { MdOutlineRateReview } from "react-icons/md"
    1516import useFormData from "../Hooks/useFormData";
    1617import useCreate from "../Hooks/useCreate";
     
    2627
    2728    console.log(props.data)
     29    const { createEntity } = useCreate();
    2830    const dateFormatter = (str) => {
    2931        const inputDate = new Date(str);
     
    114116                        <h3>Вкупна цена: <br></br>{props.data.transportRoute.price}$</h3>
    115117                    </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>}
    116132                {(props.past) && <Col className="d-flex flex-column justify-content-center align-content-center">
    117133                    {!props.data.reviewed && <Container id={'ocn'} onClick={(e) => {
     
    132148            </Row>
    133149        </Container>
    134         {props.type === 'hotel' && <HotelReservationModal show={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}/>
    136152    </>)
    137153}
Note: See TracChangeset for help on using the changeset viewer.