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/HotelDetails
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/Components/HotelDetails/RoomRow.js

    r5528b99 r07f4e8b  
    88    const [getData, setData] = useState(0);
    99    const room = props.room
     10    console.log("dasdaskjdhaskdjashdkajk")
    1011    console.log(props.data)
     12    console.log(Array(props.data.find(x => x.hotelRoom.hotelRoomId === room.hotelRoomId)))
    1113    return (
    1214        <>
     
    2224                    }}>
    2325                        <option></option>
    24                         {[...Array(props.data.find(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 => {
    2527                            return (
    2628                                <option value={x+1}  >{x + 1}</option>
  • frontend/src/Components/HotelDetails/RoomsTable.js

    r5528b99 r07f4e8b  
    77
    88const RoomsTable = (props) => {
    9 
    109
    1110    return (
     
    2120                </thead>
    2221                <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) => {
    2425                    return (
    2526                        <>
Note: See TracChangeset for help on using the changeset viewer.