import React, { useState } from 'react'; import { Panel, Form, FormControl, ControlLabel, Button, ButtonGroup, Message, FormGroup, } from 'rsuite'; import NavBar from '../../components/Navbar/NavBar'; import TimezonePicker from '../../components/General/TimezonePicker'; import IntervalSelector from '../../components/Interval/IntervalSelector'; import './Availability.less'; export default function Availability({ title }) { const [availability, setAvailability] = useState([...availabilityList]); const handleClear = () => { setAvailability([]); }; const handleSelect = ({ start, end }) => { let updatedEvents = []; let newAvailability = { start: start, end: end, }; updatedEvents.push(newAvailability); setAvailability([...availability, ...updatedEvents]); }; return ( <>
Earliest time Latest time Timezone
); } const containerStyle = { // TODO Move to a .less file maxWidth: '1200px', margin: '30px auto', backgroundColor: 'rgba(255,255,255,0.6)', }; // TODO Remove fake data const eventsList = [ { start: '2020-06-05', display: 'background', }, { start: '2020-06-06', display: 'background', }, { start: '2020-06-08', display: 'background', }, { start: '2020-06-10', display: 'background', }, { start: '2020-06-11', display: 'background', }, { start: '2020-06-21', display: 'background', }, { start: '2020-06-29', display: 'background', }, ]; const availabilityList = [ { start: '2020-06-08T08:00:00.000Z', end: '2020-06-08T12:00:00.000Z', }, { start: '2020-06-10T09:00:00.000Z', end: '2020-06-10T13:00:00.000Z', }, { start: '2020-06-11T09:00:00.000Z', end: '2020-06-11T13:00:00.000Z', }, { start: '2020-06-11T06:30:00.000Z', end: '2020-06-11T08:30:00.000Z', }, { start: '2020-06-21T07:00:00.000Z', end: '2020-06-21T11:30:00.000Z', }, { start: '2020-06-21T12:00:00.000Z', end: '2020-06-21T15:30:00.000Z', }, { start: '2020-06-06T08:00:00.000Z', end: '2020-06-06T14:00:00.000Z', }, { start: '2020-06-05T10:30:00.000Z', end: '2020-06-05T14:30:00.000Z', }, ];