source: frontend/src/Components/HotelDetails/RoomsTable.js@ e9b4ba9

Last change on this file since e9b4ba9 was e9b4ba9, checked in by darsov2 <62809499+darsov2@…>, 6 months ago

prototype

  • Property mode set to 100644
File size: 1.4 KB
Line 
1import React from "react";
2import Room from "./Room";
3import Form from "react-bootstrap/Form";
4import FaHotel from "react-icons/fa";
5import {Button} from "react-bootstrap";
6import useCreate from "../Hooks/useCreate";
7import RoomRow from "./RoomRow";
8
9const RoomsTable = (props) => {
10
11
12 console.log(props.data[0].hotelRoomAvailableId)
13 console.log([...Array(props.data[0].numberOfBeds).keys()])
14 return (
15 <>
16 <table className="m-auto table table-hover table-responsive">
17 <thead>
18 <tr>
19 <th scope="col">Тип на соба</th>
20 <th scope="col">Цена</th>
21 <th scope="col">Колку единици?</th>
22 <th scope="col"></th>
23 </tr>
24 </thead>
25 <tbody>
26 {Array.from(new Set(props.data.map(x => x.hotelRoom))).map((room) => {
27 return (
28 <>
29 <RoomRow
30 availableId={props.data.filter(x => x.hotelRoom.hotelRoomId === room.hotelRoomId).
31 map(x => x.hotelRoomAvailableId)[0]}
32 data={props.data} room={room} from={props.from} to={props.to}/>
33 </>
34 );
35 })}
36 </tbody>
37 </table>
38 </>
39 );
40};
41
42export default RoomsTable;
Note: See TracBrowser for help on using the repository browser.