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

prefinal fixes

Location:
frontend/src/Components/TransportEdit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/Components/TransportEdit/TransportEditTab.js

    r5528b99 r07f4e8b  
    99import TransportListing from "./TransportListing";
    1010import useGet from "../Hooks/useGet";
     11import ReservationListing from "../HotelEdit/ReservationListing";
    1112
    1213function TransportEditTab(props) {
    1314  const [activeTab, setActiveTab] = useState("/hotel");
    14   const link = "/transport/" + props.displayRoute.transportID + "/available";
    15   console.log(props.displayRoute)
    16   const [changed, setChanged] = useState(0)
    17   const { data, setData, isLoading, getData } = useGet(link, changed);
     15  console.log(props)
     16
     17
     18  const {
     19    data,
     20    isLoading,
     21    setData,
     22    getData,
     23    setChanged: dhanged
     24  } = useGet(`/transport/${props.displayRoute.transportID}/reservations/active`)
     25
    1826
    1927
     
    7583          </Tab.Pane>
    7684          <Tab.Pane eventKey="/restaurant">
    77             <AddNew type="restaurant"/>
     85            {!isLoading && data.map((res) => {
     86              return (
     87                  <ReservationListing type={'transport'} data={res}/>
     88              )
     89            })}
    7890          </Tab.Pane>
    7991          <Tab.Pane eventKey="/transport">
  • frontend/src/Components/TransportEdit/TransportListing.js

    r5528b99 r07f4e8b  
    99
    1010    //const type = props.type == "hotel" ? "сместувањето" : props.type == "restaurant" ? "ресторанот" : "превозот";
    11     console.log(props.data)
    12     console.log(props.data.from)
    1311    return (<>
    1412        <a href="#" style={{textDecoration: "none", color: "black"}}>
     
    3432                    <Col className="d-flex flex-column justify-content-center" style={{textAlign: "left"}}>
    3533                        <h2>{props.data.from} - {props.data.to}</h2>
    36                         {/* <h6>{props.data.routeCities}</h6> */}
    3734                        <h6>{props.data.routes.map(x => x).join(", ")}</h6>
    3835                    </Col>
     
    4037                    <Col className="d-flex flex-column justify-content-center align-content-center">
    4138                        <h5>Цена:</h5>
    42                         {/* <h4>{props.data.routePrice}</h4> */}
    43                         <h4>99$</h4>
     39                         <h4>{props.data.maxPrice}$</h4>
    4440                    </Col>
    4541                </Row>
Note: See TracChangeset for help on using the changeset viewer.