- 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/HotelEdit/ReservationListing.js
r5528b99 r07f4e8b 3 3 4 4 const ReservationListing = (props) => { 5 6 const dateFormatter = (str) => { 7 const inputDate = new Date(str); 8 9 const options = { 10 year: '2-digit', 11 month: '2-digit', 12 day: '2-digit', 13 }; 14 15 return inputDate.toLocaleString('de-DE', options); 16 } 17 5 18 return( 6 19 <> … … 15 28 <Col md={8} className="d-flex flex-column justify-content-start ps-5"> 16 29 <h3 style={{fontWeight: "bold"}} className={'text-start'}>Резервација за:</h3> 17 <h4 className={'text-start'}>{props.data.hotelRoom.hotelRoomName}</h4> 30 {props.type === 'hotel' && <h4 className={'text-start'}>{props.data.hotelRoom.hotelRoomName}</h4>} 31 {props.type === 'restaurant' && <h4 className={'text-start'}>{'Маса за ' + props.data.restaurantsTable.noSeats}</h4>} 32 {props.type === 'transport' && <h4 className={'text-start'}>{props.data.transportRoute.from + ' ' + props.data.transportRoute.to}</h4>} 33 {props.type === 'transport' && <h4 className={'text-start'}>{props.data.noSeats + ' ' + 'патници'}</h4>} 18 34 <h4 className={'text-start'}>{props.data.user.name + ' ' + props.data.user.surname}</h4> 19 <h5 className={'text-start'}>{props.data.dateFrom + ' - ' + props.data.dateTo}</h5> 35 {props.type !== 'transport' && <h5 36 className={'text-start'}>{dateFormatter(props.data.dateFrom) + ' - ' + dateFormatter(props.data.dateTo)}</h5>} 20 37 </Col> 21 38 <Col md={4} className="d-flex flex-column justify-content-center align-content-center"> 22 <h3>Вкупна цена: <br></br>{props.data.hotelRoom.price}$</h3>39 {props.type === 'hotel' && <h3>Вкупна цена: <br></br>{props.data.hotelRoom.price}$</h3>} 23 40 </Col> 24 41 </Row>
Note:
See TracChangeset
for help on using the changeset viewer.