Last change
on this file since 5528b99 was e6c2521, checked in by darsov2 <62809499+darsov2@…>, 8 months ago |
images upload/download impl, other fixes
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | import React from "react";
|
---|
2 | import Form from "react-bootstrap/Form";
|
---|
3 | import FaHotel from "react-icons/fa";
|
---|
4 | import {Button} from "react-bootstrap";
|
---|
5 | import useCreate from "../Hooks/useCreate";
|
---|
6 | import RoomRow from "./RoomRow";
|
---|
7 |
|
---|
8 | const RoomsTable = (props) => {
|
---|
9 |
|
---|
10 |
|
---|
11 | return (
|
---|
12 | <>
|
---|
13 | <table className="m-auto table table-hover table-responsive">
|
---|
14 | <thead>
|
---|
15 | <tr>
|
---|
16 | <th scope="col">Тип на соба</th>
|
---|
17 | <th scope="col">Цена</th>
|
---|
18 | <th scope="col">Колку единици?</th>
|
---|
19 | <th scope="col"></th>
|
---|
20 | </tr>
|
---|
21 | </thead>
|
---|
22 | <tbody>
|
---|
23 | {Array.from(new Set(props.data.map(x => x.hotelRoom))).map((room) => {
|
---|
24 | return (
|
---|
25 | <>
|
---|
26 | <RoomRow
|
---|
27 | availableId={props.data.filter(x => x.hotelRoom.hotelRoomId === room.hotelRoomId).
|
---|
28 | map(x => x.hotelRoomAvailableId)[0]}
|
---|
29 | data={props.data} room={room} from={props.from} to={props.to}/>
|
---|
30 | </>
|
---|
31 | );
|
---|
32 | })}
|
---|
33 | </tbody>
|
---|
34 | </table>
|
---|
35 | </>
|
---|
36 | );
|
---|
37 | };
|
---|
38 |
|
---|
39 | export default RoomsTable;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.