Commit 35152c09 authored by Gabriel Silva Hermida's avatar Gabriel Silva Hermida Committed by Gabriel Silva Hermida

limpeza em comentarios e funções

Signed-off-by: Gabriel Silva Hermida's avatarGabriel_S <gash18@inf.ufpr.br>
parent ffc367d4
Pipeline #22978 failed with stages
in 39 seconds
import React, { useState, useEffect } from 'react';
import Container from '@material-ui/core/Container';
import CssBaseline from '@material-ui/core/CssBaseline';
import Input from '@material-ui/core/Input';
import React, { useState } from 'react';
import TextField from '@material-ui/core/TextField';
import Typography from '@material-ui/core/Typography';
import Grid from '@material-ui/core/Grid';
......@@ -166,11 +163,8 @@ export function UploadScreen(props) {
</div>
)
return (fileuploded)? upload_form : upload_screen;
//return (fileuploded == false)? upload_screen : upload_form;
}
export function Upload(props) {
const styles = { backgroundColor: '#F6F6F6',border: " 2px solid #CECECE", height: '220px', width: '375px' }
const classes = useStyles();
return (
<Grid
container
......
This diff is collapsed.
import React from 'react';
import './App.css';
import {Header} from './components/header/Header';
import {Toast} from "./components/toast/Toast.jsx"
import Routes from './routes';
import {BrowserRouter as Router} from "react-router-dom"
import Message,{Messages,MessageActive} from "./messagesystem"
//const App = ()=>Routes()
import {Messages,MessageActive} from "./messagesystem"
function App() {
const [message,setMessage] = React.useState("");
const [message_active,setMessageActive] = React.useState(false);
......
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import ListSubheader from '@material-ui/core/ListSubheader';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@material-ui/core/ListItemText';
import Collapse from '@material-ui/core/Collapse';
import InboxIcon from '@material-ui/icons/MoveToInbox';
import DraftsIcon from '@material-ui/icons/Drafts';
import SendIcon from '@material-ui/icons/Send';
import ExpandLess from '@material-ui/icons/ExpandLess';
import ExpandMore from '@material-ui/icons/ExpandMore';
import StarBorder from '@material-ui/icons/StarBorder';
const useStyles = makeStyles(theme => ({
root: {
......
import React from 'react';
import Checkbox from '@material-ui/core/Checkbox';
//import { makeStyles } from '@material-ui/core/styles';
/*
*
......
/*import React from 'react';
import Container from '@material-ui/core/Container'
import Typography from '@material-ui/core/Typography';
export function ContainerList(props) {
var count_elements = props.elements_size;
var visible_element = 6;
var _height = "220px";
var _width = "842px";
return (
<div>
<Container maxWidth="sm">
<Typography
component="div"
style={{ backgroundColor: '#cfe8fc', height: _height,width: _width }}
<h1>oi</h1>
/>
</Container>
</div>
)
}
*/
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
......@@ -41,8 +15,6 @@ import Paper from '@material-ui/core/Paper';
import {CheckBox} from '../checkbox/CheckBox.jsx';
import IconButton from '@material-ui/core/IconButton';
import Tooltip from '@material-ui/core/Tooltip';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Switch from '@material-ui/core/Switch';
import DeleteIcon from '@material-ui/icons/Delete';
import FilterListIcon from '@material-ui/icons/FilterList';
......
import React from 'react';
import Button from '@material-ui/core/Button';
import CallMergeIcon from '@material-ui/icons/CallMerge';
import AccessTimeIcon from '@material-ui/icons/AccessTime';
import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
......
......@@ -11,8 +11,6 @@ import ListItemText from '@material-ui/core/ListItemText';
import IconButton from '@material-ui/core/IconButton';
import MenuIcon from '@material-ui/icons/Menu';
import PersonAddIcon from '@material-ui/icons/PersonAdd';
import SearchIcon from '@material-ui/icons/Search';
// Drawer
import Drawer from '@material-ui/core/Drawer'
import Divider from '@material-ui/core/Divider';
import {Wizard} from '../wizard/Wizard.jsx'
......@@ -100,7 +98,6 @@ const useStyles = makeStyles(theme => ({
},
headerButton: {
marginLeft:'20px',
// fontFamily: 'Open Sans',
textTransform: 'capitalize',
},
}),
......@@ -119,7 +116,6 @@ function ListItemLink(props) {
export function Options(props) {
const classes = useStyles(props);
const [role, setRole] = React.useState("")
React.useEffect(()=>{
const fetchData = async () => {
......@@ -282,7 +278,6 @@ export function DrawerMenu(props) {
}
export function Header(props) {
const theme = useTheme();
const {color, ...other} = props
const classes = useStyles(props);
const [open, setOpen] = React.useState(false);
......@@ -310,22 +305,12 @@ export function Header(props) {
</IconButton>
</Grid>
<Grid container justify="flex-end">
{/* <Grid container item xs={4} justify="center"> */}
<Button component={Link} to="/" color="inherit" className={classes.headerButton} >Home</Button>
<Button component={Link} to="/reservarsala" color="inherit" className={classes.headerButton} >Reservar Sala</Button>
{/*
<Button color="inherit" className={classes.headerButton} >Resultado</Button>
<Button color="inherit" className={classes.headerButton} >Indicadores</Button>
<Button color="inherit" className={classes.headerButton} >Universidade</Button>*/}
{/* </Grid> */}
{/* <Grid container item xs={4} justify="center"> */}
<Button color="inherit" href="http://www.campusmap.ufpr.br/" className={classes.headerButton} >Mapas</Button>
{/* </Grid> */}
{/* <Grid container item xs={4} justify="center"> */}
{ isAuthenticated() &&
<Button color="inherit" onClick={()=>setW(!w)} className= {classes.headerButton} >{(!w)? "Ajuda" : "fechar ajuda"}</Button>
}
{/* </Grid> */}
</Grid>
</Toolbar>
</AppBar>
......
import React from 'react';
import { makeStyles,useTheme } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import {Field} from "../textfield/TextField.jsx";
import {GreenButton} from "../greenbutton/GreenButton.jsx";
import Grid from '@material-ui/core/Grid';
import { Link, withRouter } from "react-router";
import Button from '@material-ui/core/Button';
import api from "../../api";
import {login,isAuthenticated} from "../../services/auth"
import {login} from "../../services/auth"
const useStyles = makeStyles(theme => ({
root: {
flexGrow: 1,
......
import React from 'react';
import Chip from '@material-ui/core/Chip';
import Autocomplete from '@material-ui/lab/Autocomplete';
import TextField from '@material-ui/core/TextField';
import clsx from 'clsx';
import { makeStyles, useTheme } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import Input from '@material-ui/core/Input';
import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@material-ui/core/MenuItem';
......@@ -41,19 +39,8 @@ const MenuProps = {
},
};
function getStyles(name, personName, theme) {
return {
fontWeight:
personName.indexOf(name) === -1
? theme.typography.fontWeightRegular
: theme.typography.fontWeightMedium,
};
}
export function MultipleSelect(props) {
const classes = _useStyles();
const theme = useTheme();
const [personName, setPersonName] = React.useState((props.defaultValue)? props.defaultValue : []);
React.useEffect(() => {
if( props.defaultValue)
......
......@@ -176,21 +176,22 @@ export function CustTable(props) {
if(props.setSelect) {
props.setSelect(props.array[name]);
}
// javascript não tem switch case??
if (selectedIndex === -1) {
switch (selectedIndex){
case -1:
newSelected = newSelected.concat(selected, name);
} else if (selectedIndex === 0) {
break;
case 0:
newSelected = newSelected.concat(selected.slice(1));
} else if (selectedIndex === selected.length - 1) {
break;
case (selected.length -1):
newSelected = newSelected.concat(selected.slice(0, -1));
} else if (selectedIndex > 0) {
break;
default:
newSelected = newSelected.concat(
selected.slice(0, selectedIndex),
selected.slice(selectedIndex + 1),
);
selected.slice(0, selectedIndex),
selected.slice(selectedIndex + 1),
);
}
setSelected(newSelected);
}
......
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
const useStyles = makeStyles(theme => ({
textField: {
marginLeft: theme.spacing(1),
marginRight: theme.spacing(1),
width: 200,
backgroundColor: "#fffff"
}
}));
/* Usage:
* <Field type="password" id="12" label="password field" />
* <Field id="12" label="text field" />
......
import React from 'react';
import {Messages,MessageActive} from "../../messagesystem"
import Snackbar from '@material-ui/core/Snackbar';
// import { makeStyles } from '@material-ui/core/styles';
export function Toast(props) {
......
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(
<App />, document.getElementById('root')
);
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
ReactDOM.render(<App />, document.getElementById("root"));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
import React from 'react';
import {Toast} from "./components/toast/Toast.jsx"
export const Messages = React.createContext("");
export const MessageActive = React.createContext(false);
export const warn = 1
......
......@@ -71,7 +71,6 @@ export function UploadForm(props) {
const styles_info = { backgroundColor: '#F6F6F6',border: " 2px solid #CECECE", height: '270px', width: '405px' }
var _date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
var [date_init, setDateInit] = useState(_date);
var [semester, setSemester] = useState("");
var [date_end, setDateEnd] = useState(_date);
const classes = useStyles();
const {result, setResult} = React.useContext(Result);
......@@ -189,15 +188,12 @@ export function UploadScreen(props) {
//return (fileuploded == false)? upload_screen : upload_form;
}
export function Message(props) {
const [result,setResult] = React.useContext(Result);
return (
<Toast msg={"Enviado com sucesso"} />
)
}
export function Upload(props) {
const styles = { backgroundColor: '#F6F6F6',border: " 2px solid #CECECE", height: '220px', width: '375px' }
const classes = useStyles();
var [fileuploded, setFileUploded] = useState(false);
var [result, setResult] = useState(false);
var [file, setFile] = useState(null);
......@@ -205,7 +201,7 @@ export function Upload(props) {
var [file_name, setFileName] = useState("");
const {message,setMessage} = React.useContext(Messages)
if (fileuploded) {
var comp = <UploadForm
var comp = <UploadForm
setFileUploded={setFileUploded}
setFile={setFile}
setFileName={setFileName}
......
......@@ -96,7 +96,6 @@ function compareCode(a,b){
export function ListDisciplina(props) {
const classes = useStyles();
const disciplinas = props.disciplinas
const [data, setData] = useState([]);
const [ver,setVer] = useState(false)
......@@ -196,7 +195,6 @@ export function ListDisciplina(props) {
)
}
export function Disciplina(props) {
const classes = useStyles();
var departamento = props.departamento
const {disciplinas, setDisciplinas} = useContext(Disciplinas)
const [dpt_code, setDptCodigo] = useState(props.departamento.codigo);
......@@ -238,7 +236,7 @@ export function Equivalencias (props) {
const role_result = await api.get(`usuarios/${_user}/role`)
user = user_result.data
const role = role_result.data
if(role.role == "secretario_dpto" && user.secretario && user.secretario.valor_vinculo) {
if(role.role === "secretario_dpto" && user.secretario && user.secretario.valor_vinculo) {
setSec(true)
set_query_cache("departamento_disciplina",user.secretario.valor_vinculo);
setQuery("[where][codigo]="+user.secretario.valor_vinculo)
......@@ -259,7 +257,7 @@ export function Equivalencias (props) {
const role_result = await api.get(`usuarios/${_user}/role`)
user = user_result.data
const role = role_result.data
if(role.role == "secretario_dpto" && user.secretario && user.secretario.valor_vinculo) {
if(role.role === "secretario_dpto" && user.secretario && user.secretario.valor_vinculo) {
setSec(true)
set_query_cache("departamento_disciplina",user.secretario.valor_vinculo);
setQuery("[where][codigo]="+user.secretario.valor_vinculo)
......
......@@ -14,7 +14,7 @@ import Paper from '@material-ui/core/Paper';
import Button from '@material-ui/core/Button';
const CursoSelect = React.createContext({ "curso":"", "curso":"", "periodo":"", "vagas":0, });
const CursoSelect = React.createContext({ "curso":"", "periodo":"", "vagas":0, });
const Change = React.createContext(false);
const useStyles = makeStyles(theme => ({
container: {
......
......@@ -78,7 +78,6 @@ export function InputField(props) {
}
export function MenuInfo(props) {
// const classes = useStyles();
const {departamento_select, setDepartamentoSelected} = useContext(DepartamentoSelect);
const handleChange = name => event => {
console.log(departamento_select)
......@@ -172,8 +171,6 @@ export function ListDepartamento(props) {
];
var setor = props.setor
var setorCod = props.setorCod
var departamentos_list = [];
......
......@@ -67,15 +67,6 @@ const useStyles = makeStyles(theme => ({
}));
const emptyEnsalamento = {
"nome": "",
"email": "",
"password":"",
"username":"",
"vinculo":"",
"role":""
}
function compareCode(a,b){
const A = a.semestre;
const B = b.semestre;
......@@ -103,9 +94,6 @@ export function HeaderEnsalamento(props) {
// color: "#676767"
// };
const {ensalamento_select, setEnsalamentoSelected} = useContext(EnsalamentoSelect);
function addEnsalamento() {
setEnsalamentoSelected(emptyEnsalamento);
}
const {message_active,setMessageActive} = React.useContext(MessageActive)
const {message,setMessage} = React.useContext(Messages);
async function handleEnsalar() {
......
......@@ -272,7 +272,7 @@ export function GerenciarReserva (props) {
const role_result = await api.get(`usuarios/${_user}/role`)
user = user_result.data
const role = role_result.data
if((role.role == "secretario_dpto" || role.role == "secretario_setor" ) && user.secretario) {
if((role.role === "secretario_dpto" || role.role === "secretario_setor" ) && user.secretario) {
setSec(true)
const result = await api.get(`reservas?filter[where][ownerId]=${user.secretario.id}`,);
setReservas(result.data)
......
import React, {useState, useEffect,useContext} from 'react';
import AlertDialog from '../components/dialog/dialog';
import {Messages,MessageActive} from "../messagesystem"
import {set_query_cache,get_query_cache} from "../services/query";
import FormControl from '@material-ui/core/FormControl';
import CallMergeIcon from '@material-ui/icons/CallMerge';
import {SelectField, Tags} from '../components/select/Select'
import TextField from '@material-ui/core/TextField';
import Divider from '@material-ui/core/Divider';
import AccessTimeIcon from '@material-ui/icons/AccessTime';
import Add from '@material-ui/icons/Add';
import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline';
import DeleteOutline from '@material-ui/icons/DeleteOutline'
import api from '../api'
import {getUserId} from '../services/auth'
import {CustTable} from '../components/table/Table';
import {Toast} from '../components/toast/Toast';
import Typography from '@material-ui/core/Typography';
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
import Button from '@material-ui/core/Button';
import MaterialTable from 'material-table'
import { makeStyles, useTheme } from '@material-ui/core/styles';
import Input from '@material-ui/core/Input';
......@@ -232,27 +217,8 @@ function HorarioTable(props) {
horario_final.setHours(_h[0],_h[1],0,0)
horarios_list.push(createHorariosList(i,horarios[i].dia,horario_inicial,horario_final,horarios[i].salaCode,horarios[i].livre,horarios[i].id));
}
// if(horarios.length === horarios_list.length && !ver && horarios.length !== 0 ){
// setVer(true)
setData(horarios_list)
},[props.turmas]);
// for(let i = 0; i < horarios.length;i++){
// var horario_inicial = new Date()
// var h = horarios[i].horario_inicial.split(":")
// horario_inicial.setHours(h[0],h[1],0,0)
// var horario_final = new Date()
// var _h = horarios[i].horario_final.split(":")
// horario_final.setHours(_h[0],_h[1],0,0)
// horarios_list.push(createHorariosList(i,horarios[i].dia,horario_inicial,horario_final,horarios[i].salaCode,horarios[i].livre,horarios[i].id));
// }
// // if(horarios.length === horarios_list.length && !ver && horarios.length !== 0 ){
// // setVer(true)
// setData(horarios_list)
//}
// if( horarios_list.length !== data.length){
// setVer(false)
// }
return (
<MaterialTable title={"Horarios"} columns={header_list} data={data.filter(horario => horario.id).sort(compareId)}
options={{filtering: true,selection: false,exportButton: true,emptyRowsWhenPaging:false,pageSizeOptions:[5,10,20,50,100],addRowPosition:'first',sorting:false,draggable:false}}
......@@ -384,7 +350,6 @@ function TurmaTable( props) {
{ field: 'semestre', title: "Semestre", lookup: props.semestres},
{ field: 'id', title:'id', hidden: true}
];
const dpto_nome = props.departamentoNome
var turmas_list = []
......@@ -646,7 +611,7 @@ export function GerenciarTurma (props) {
user = user_result.data
console.log( user)
const role = role_result.data
if(role.role == "secretario_dpto" && user.secretario && user.secretario.valor_vinculo) {
if(role.role === "secretario_dpto" && user.secretario && user.secretario.valor_vinculo) {
console.log("[where][codigo]="+user.secretario.valor_vinculo)
setSec(true)
set_query_cache("departamento_turma",user.secretario.valor_vinculo);
......@@ -669,7 +634,7 @@ export function GerenciarTurma (props) {
const role_result = await api.get(`usuarios/${_user}/role`)
user = user_result.data
const role = role_result.data
if(role.role == "secretario_dpto" && user.secretario && user.secretario.valor_vinculo) {
if(role.role === "secretario_dpto" && user.secretario && user.secretario.valor_vinculo) {
console.log("[where][codigo]="+user.secretario.valor_vinculo)
setSec(true)
set_query_cache("departamento_turma",user.secretario.valor_vinculo);
......@@ -731,10 +696,6 @@ export function GerenciarTurma (props) {
})}
</Grid>
</Grid>
{/* <Grid item xs={4} md={4} sm={4} lg={3}> menu */}
{/* <Menu dpts={dpts} setTurmaSelect={setTurmaSelect} codigo_turma={turma_select.codigo}></Menu> */}
{/* </Grid> */}
</Grid>
</div>
</Turmas.Provider>
......
......@@ -156,7 +156,6 @@ export function ListUsuario(props) {
resolve();
},1000);
}),
// função que atualiza os dados
onRowUpdate: (newData,oldData) =>
new Promise ((resolve,reject) => {
setTimeout(() => {
......
import React, { useState, useEffect } from 'react';
import Container from '@material-ui/core/Container';
import CssBaseline from '@material-ui/core/CssBaseline';
import Input from '@material-ui/core/Input';
import TextField from '@material-ui/core/TextField';
import Typography from '@material-ui/core/Typography';
import Grid from '@material-ui/core/Grid';
import { makeStyles } from '@material-ui/core/styles';
import {Messages,MessageActive} from "../messagesystem"
......@@ -149,9 +145,6 @@ export function ChangePasswordForm(props) {
export function ChangePassword(props) {
const styles = { backgroundColor: '#F6F6F6',border: " 2px solid #CECECE", height: '220px', width: '375px' }
const classes = useStyles();
const {message,setMessage} = React.useContext(Messages)
return (
<Grid
container
......
import React, { useState } from "react";
import Message,{Messages,MessageActive} from "../messagesystem"
import React from "react";
import {NestedList} from "../components/List/list.jsx";
import TextField from '@material-ui/core/TextField';
import Grid from '@material-ui/core/Grid';
import logo from '../images/simbolo_peb-09.png'
import InputAdornment from '@material-ui/core/InputAdornment';
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
import { makeStyles, useTheme, withStyles } from '@material-ui/core/styles';
import { makeStyles, withStyles } from '@material-ui/core/styles';
import { MenuItem } from '@material-ui/core';
import FormControl from '@material-ui/core/FormControl';
import Select from '@material-ui/core/Select';
import api from '../api';
import Paper from '@material-ui/core/Paper';
import TableBody from '@material-ui/core/TableBody';
......@@ -82,9 +79,6 @@ export function BlocoSearch(props) {
return (<TurmaTableVertical rows={r} />)
}
// export function ProfessorSearch(props) {
// return ( <h1>professor</h1>)}
export function SalaSearch(props) {
const {rows, setRows} = React.useContext(Rows);
const [r,setR] = React.useState([])
......@@ -417,17 +411,6 @@ function DepartamentoSubComponente(props) {
})
})
//for(var i=0; i<props.row.turmas.length; i++) {
// var turma = props.row.turmas[i]
// var curso_str = ( turma.cursos)? turma.cursos.map((curso)=>{return (curso)? curso.nome : ""}) : null
// var professor_str = ( turma.professores)? turma.professores.map((professor)=>{return (professor)? professor.nome : ""}) : null
// _turmas.push({ "turma": turma,
// "horarios": turma.horarios,
// "disciplina": turma.disciplina.nome,
// "curso": (curso_str)? curso_str.join(", ") : "",
// "professor": (professor_str)? professor_str.join(", ") : "",
// })
//}
}
setTurmas(_turmas)
console.log( _turmas)
......@@ -499,8 +482,6 @@ export function DepartamentoSearch(props) {
export function PaginaInicial(props) {
const {message_active,setMessageActive} = React.useContext(MessageActive)
const {message,setMessage} = React.useContext(Messages);
const classes = useStyles();
const [selectSearch, setSelectSearch] = React.useState(0);
const [rows, setRows] = React.useState([]);
......@@ -530,10 +511,6 @@ export function PaginaInicial(props) {
setHandleSubmitionFunction(handleSubmitSala)
setHandleSearch(<SalaSearch/>)
break;
// case PROFESSOR:
// setHandleSubmitionFunction(handleSubmitProfessor)
// setHandleSearch(<ProfessorSearch/>)
// break;
}
},[selectSearch])
......@@ -592,9 +569,6 @@ export function PaginaInicial(props) {
case SALA:
await handleSubmitSala()
break;
// case PROFESSOR:
// await handleSubmitProfessor()
// break;
}
setSearched(true);
}
......@@ -636,7 +610,6 @@ export function PaginaInicial(props) {
<MenuItem value={CURSO}>Curso</MenuItem>
<MenuItem value={SALA}>Sala</MenuItem>
<MenuItem value={BLOCO}>Bloco</MenuItem>
{/* <MenuItem value={PROFESSOR}>Professor</MenuItem> */}
</TextField>
</Grid>
<Grid item sm={4}>
......@@ -661,10 +634,10 @@ export function PaginaInicial(props) {
</Grid>
</Grid>
</form>
{ rows.length != 0 &&
{ rows.length !== 0 &&
handleSearch
}
{(rows.length == 0 && searched) &&
{(rows.length === 0 && searched) &&
<Typography color="error" variant='h6'>
<p/> Sua pesquisa não obteve resultados
</Typography>}
......
import React, { useState, useEffect } from 'react';
import Container from '@material-ui/core/Container';
import CssBaseline from '@material-ui/core/CssBaseline';
import Input from '@material-ui/core/Input';
import TextField from '@material-ui/core/TextField';
import Typography from '@material-ui/core/Typography';
import Grid from '@material-ui/core/Grid';
import { makeStyles, withStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import api from '../api'
import {Link,Redirect} from "react-router-dom"
import {Link} from "react-router-dom"
import {Messages,MessageActive} from "../messagesystem"
import {SelectField} from '../components/select/Select'
import {Toast} from '../components/toast/Toast';
import Box from '@material-ui/core/Box';
import {green} from '@material-ui/core/colors';
import Checkbox from '@material-ui/core/Checkbox';
import FormControlLabel from '@material-ui/core/FormControlLabel';
const GreenCheckbox = withStyles({
root: {
color: green[400],
......@@ -161,7 +151,7 @@ function ReservationTable(props) {
body["dias"] = [...new Set( body["dias"])];
}
}
if(body["dias"].length==0){
if(body["dias"].length===0){
newMissing["weekdays"]=true;
setMissing(newMissing)
setMessage("Dias para repetir são obrigatórios")
......@@ -224,16 +214,6 @@ function ReservationTable(props) {
setMessageActive(true)
cb()
}
// if(email){
// body["email"] = motivation
// }else{
// newMissing["email"]=true;
// setMissing(newMissing)
// setMessage("email é obrigatório")
// setMessageActive(true)
// return
// }
if(organizador){