Changeset 07f4e8b for frontend/src/Components/HotelDetails
- Timestamp:
- 01/24/24 17:42:28 (10 months ago)
- Branches:
- master
- Children:
- 0f5aa27
- Parents:
- 5528b99
- Location:
- frontend/src/Components/HotelDetails
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/HotelDetails/RoomRow.js
r5528b99 r07f4e8b 8 8 const [getData, setData] = useState(0); 9 9 const room = props.room 10 console.log("dasdaskjdhaskdjashdkajk") 10 11 console.log(props.data) 12 console.log(Array(props.data.find(x => x.hotelRoom.hotelRoomId === room.hotelRoomId))) 11 13 return ( 12 14 <> … … 22 24 }}> 23 25 <option></option> 24 {[...Array(props.data.fi nd(x => x.hotelRoom.hotelRoomId === room.hotelRoomId).numberOfBeds).keys()].map(x => {26 {[...Array(props.data.filter(x => x.hotelRoom.hotelRoomId === room.hotelRoomId).reduce((sum, x) => x.numberOfBeds)).keys()].map(x => { 25 27 return ( 26 28 <option value={x+1} >{x + 1}</option> -
frontend/src/Components/HotelDetails/RoomsTable.js
r5528b99 r07f4e8b 7 7 8 8 const RoomsTable = (props) => { 9 10 9 11 10 return ( … … 21 20 </thead> 22 21 <tbody> 23 {Array.from(new Set(props.data.map(x => x.hotelRoom))).map((room) => { 22 {Array.from( 23 new Set(props.data.map((x) => JSON.stringify(x.hotelRoom))) 24 ).map((roomString) => JSON.parse(roomString)).map((room) => { 24 25 return ( 25 26 <>
Note:
See TracChangeset
for help on using the changeset viewer.