Changeset 07f4e8b for frontend/src/Components/TransportEdit
- Timestamp:
- 01/24/24 17:42:28 (10 months ago)
- Branches:
- master
- Children:
- 0f5aa27
- Parents:
- 5528b99
- Location:
- frontend/src/Components/TransportEdit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/TransportEdit/TransportEditTab.js
r5528b99 r07f4e8b 9 9 import TransportListing from "./TransportListing"; 10 10 import useGet from "../Hooks/useGet"; 11 import ReservationListing from "../HotelEdit/ReservationListing"; 11 12 12 13 function TransportEditTab(props) { 13 14 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 18 26 19 27 … … 75 83 </Tab.Pane> 76 84 <Tab.Pane eventKey="/restaurant"> 77 <AddNew type="restaurant"/> 85 {!isLoading && data.map((res) => { 86 return ( 87 <ReservationListing type={'transport'} data={res}/> 88 ) 89 })} 78 90 </Tab.Pane> 79 91 <Tab.Pane eventKey="/transport"> -
frontend/src/Components/TransportEdit/TransportListing.js
r5528b99 r07f4e8b 9 9 10 10 //const type = props.type == "hotel" ? "сместувањето" : props.type == "restaurant" ? "ресторанот" : "превозот"; 11 console.log(props.data)12 console.log(props.data.from)13 11 return (<> 14 12 <a href="#" style={{textDecoration: "none", color: "black"}}> … … 34 32 <Col className="d-flex flex-column justify-content-center" style={{textAlign: "left"}}> 35 33 <h2>{props.data.from} - {props.data.to}</h2> 36 {/* <h6>{props.data.routeCities}</h6> */}37 34 <h6>{props.data.routes.map(x => x).join(", ")}</h6> 38 35 </Col> … … 40 37 <Col className="d-flex flex-column justify-content-center align-content-center"> 41 38 <h5>Цена:</h5> 42 {/* <h4>{props.data.routePrice}</h4> */} 43 <h4>99$</h4> 39 <h4>{props.data.maxPrice}$</h4> 44 40 </Col> 45 41 </Row>
Note:
See TracChangeset
for help on using the changeset viewer.