Last change
on this file since 0f5aa27 was 07f4e8b, checked in by darsov2 <62809499+darsov2@…>, 8 months ago |
prefinal fixes
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[e6c2521] | 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 TableRow from "./TableRow";
|
---|
| 7 |
|
---|
| 8 | const TablesTable = (props) => {
|
---|
| 9 |
|
---|
| 10 | console.log(props)
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | return (
|
---|
| 14 | <>
|
---|
| 15 | <table className="m-auto table table-hover table-responsive">
|
---|
| 16 | <thead>
|
---|
| 17 | <tr>
|
---|
| 18 | <th scope="col">Тип на маса</th>
|
---|
| 19 | <th scope="col">Колку единици?</th>
|
---|
| 20 | <th scope="col"></th>
|
---|
| 21 | </tr>
|
---|
| 22 | </thead>
|
---|
| 23 | <tbody>
|
---|
[07f4e8b] | 24 | {Array.from(
|
---|
| 25 | new Set(props.data.map((x) => JSON.stringify(x.restaurantTable)))
|
---|
| 26 | ).map((roomString) => JSON.parse(roomString)).map((table) => {
|
---|
[e6c2521] | 27 | return (
|
---|
| 28 | <>
|
---|
| 29 | <TableRow
|
---|
| 30 | params={props.params}
|
---|
| 31 | availableId={props.data.filter(x => x.restaurantTable.tableId === table.tableId).
|
---|
| 32 | map(x => x.restaurantAvailibleId)[0]}
|
---|
| 33 | data={props.data} table={table} from={props.from} to={props.to}/>
|
---|
| 34 | </>
|
---|
| 35 | );
|
---|
| 36 | })}
|
---|
| 37 | </tbody>
|
---|
| 38 | </table>
|
---|
| 39 | </>
|
---|
| 40 | );
|
---|
| 41 | };
|
---|
| 42 |
|
---|
| 43 | export default TablesTable;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.