source: frontend/src/Components/Tab/TabFormRestaurant.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: 2.3 KB
Line 
1import React from "react";
2import { Button, Col, Container, Form, Row } from "react-bootstrap";
3import { HiMagnifyingGlass } from "react-icons/hi2"
4
5const timeOfArrival = () => {
6 let times = [];
7
8 for (let i = 0; i <= 23; i++) {
9 for (let j = 0; j <= 45; j += 15) {
10 let hour = i.toString().padStart(2, "0");
11 let minutes = j.toString().padStart(2, "0");
12 times.push(`${hour}:${minutes}`);
13 }
14 }
15
16 return times;
17};
18
19function TabFormRestaurant() {
20 const a = timeOfArrival();
21
22 return (
23 <Form>
24 <Row>
25 <Col>
26 <Form.Floating className="mb-3">
27 <Form.Control
28 size="lg"
29 type="text"
30 placeholder="Место:"
31 id="location"
32 ></Form.Control>
33 <label htmlFor="location">Место:</label>
34 </Form.Floating>
35 </Col>
36 <Col>
37 <Form.Floating className="mb-3">
38 <Form.Control
39 size="md"
40 type="date"
41 placeholder="Датум:"
42 id="dateFrom"
43 ></Form.Control>
44 <label htmlFor="dateFrom">Датум:</label>
45 </Form.Floating>
46 </Col>
47 <Col>
48 <Form.Floating className="mb-3">
49 <Form.Select size="md">
50 <option>Изберете време:</option>
51 {a.map((x) => {
52 return <option key={x}>{x}</option>;
53 })}
54 </Form.Select>
55 <label htmlFor="hour">Час:</label>
56 </Form.Floating>
57 </Col>
58 <Col>
59 <Form.Floating className="mb-3">
60 <Form.Control
61 size="md"
62 type="number"
63 placeholder="Број на гости:"
64 id="floatingPassengers"
65 ></Form.Control>
66 <label htmlFor="floatingPassengers">Број на гости:</label>
67 </Form.Floating>
68 <Form.Group className="my-1">
69 <Button type="submit" style={{backgroundColor: "#159895"}} size="lg">
70 <span className="ikona my-1"><HiMagnifyingGlass/></span>
71 <span className="ikona mx-3">Пребарај</span>
72 </Button>
73 </Form.Group>
74 </Col>
75 </Row>
76 </Form>
77 );
78}
79
80export default TabFormRestaurant;
Note: See TracBrowser for help on using the repository browser.