Commit 65904b0a authored by Matheus Horstmann's avatar Matheus Horstmann 🐴

Pages Odair

botao do wizard e inicio do equivalencia disciplina

adiciona equivalencia turma e resolve cache de filtro
parent 760927aa
/*
import React, { useState, useEffect } from 'react';
import './App.css';
import {Header} from './components/header/Header';
import {Toast} from './components/toast/Toast';
// import {Wizard} from './components/wizard/Wizard';
import {SimpleModal} from './components/modal/Modal';
import {CustTable} from './components/table/Table';
import Button from '@material-ui/core/Button';
import {Upload} from './pages/ensalamento.jsx';
import {GerenciarTurma} from './pages/gerenciarturma.jsx';
function createData(a, b, c, d, t,f) {
return { a, b, c, d, t, f };
}
const tmp = [
createData('Cupcake', 305, 3.7, 67, 4.3,'da'),
createData('Donut', 452, 25.0, 51, 4.9,'da'),
createData('Eclair', 262, 16.0, 24, 6.0,'da'),
createData('Frozen yoghurt', 159, 6.0, 24, 4.0,'da'),
createData('Gingerbread', 356, 16.0, 49, 3.9,'da'),
createData('Honeycomb', 408, 3.2, 87, 6.5,'da'),
createData('Ice cream sandwich', 237, 9.0, 37, 4.3,'da'),
createData('Jelly Bean', 375, 0.0, 94, 0.0,'da'),
createData('KitKat', 518, 26.0, 65, 7.0,'da'),
createData('Lollipop', 392, 0.2, 98, 0.0,'da'),
createData('Marshmallow', 318, 0, 81, 2.0,'da'),
createData('Nougat', 360, 19.0, 9, 37.0,'da'),
createData('Oreo', 437, 18.0, 63, 4.0,'da'),
];
let tmp2 = [
{ id: 'a', numeric: false, disablePadding: true, label: 'a' },
{ id: 'b', numeric: true, disablePadding: false, label: 'b' },
{ id: 'c', numeric: true, disablePadding: false, label: 'c' },
{ id: 'd', numeric: true, disablePadding: false, label: 'd' },
{ id: 't', numeric: true, disablePadding: false, label: 'tdddddd' },
{ id: 'f', numeric: true, disablePadding: false, label: 'f' },
];
const login = {
"email":"admin@admin.com",
"username":"admin",
"password":"123mudar"
}
function App() {
var [screen, setScreen] = useState(false);
var [token, setToken] = useState(null);
return (screen)? (
<div className="App">
<Header> </Header>
<Upload></Upload>
</div>
) :
( <div className="App">
<Header> </Header>
<GerenciarTurma></GerenciarTurma>
</div> ) ;
}
export default App;
*/
import React from 'react';
import './App.css';
import {Header} from './components/header/Header';
import {Toast} from './components/toast/Toast';
// import {Wizard} from './components/wizard/Wizard';
import {SimpleModal} from './components/modal/Modal';
import {CustTable} from './components/table/Table';
function createData(a, b, c, d, t,f) {
return { a, b, c, d, t, f };
}
const tmp = [
createData('Cupcake', 305, 3.7, 67, 4.3,'da'),
createData('Donut', 452, 25.0, 51, 4.9,'da'),
createData('Eclair', 262, 16.0, 24, 6.0,'da'),
createData('Frozen yoghurt', 159, 6.0, 24, 4.0,'da'),
createData('Gingerbread', 356, 16.0, 49, 3.9,'da'),
createData('Honeycomb', 408, 3.2, 87, 6.5,'da'),
createData('Ice cream sandwich', 237, 9.0, 37, 4.3,'da'),
createData('Jelly Bean', 375, 0.0, 94, 0.0,'da'),
createData('KitKat', 518, 26.0, 65, 7.0,'da'),
createData('Lollipop', 392, 0.2, 98, 0.0,'da'),
createData('Marshmallow', 318, 0, 81, 2.0,'da'),
createData('Nougat', 360, 19.0, 9, 37.0,'da'),
createData('Oreo', 437, 18.0, 63, 4.0,'da'),
];
let tmp2 = [
{ id: 'a', numeric: false, disablePadding: true, label: 'a' },
{ id: 'b', numeric: true, disablePadding: false, label: 'b' },
{ id: 'c', numeric: true, disablePadding: false, label: 'c' },
{ id: 'd', numeric: true, disablePadding: false, label: 'd' },
{ id: 't', numeric: true, disablePadding: false, label: 'tdddddd' },
{ id: 'f', numeric: true, disablePadding: false, label: 'f' },
];
function App() {
return (
<div className="App">
<Header> </Header>
<Toast msg='Behold the work of the mighty toast' timer='60000' ></Toast>
{/* <SimpleModal /> */}
<CustTable rows={tmp} headCell={tmp2} order='asc' orderBy='b'/>
</div>
);
}
export default App;
import React, { useState, useEffect } from 'react';
import './App.css';
import {Header} from './components/header/Header';
import {Toast} from './components/toast/Toast';
// import {Wizard} from './components/wizard/Wizard';
import {SimpleModal} from './components/modal/Modal';
import {CustTable} from './components/table/Table';
import Button from '@material-ui/core/Button';
import {Upload} from './pages/ensalamento.jsx';
import {GerenciarTurma} from './pages/gerenciarturma.jsx';
function createData(a, b, c, d, t,f) {
return { a, b, c, d, t, f };
}
const tmp = [
createData('Cupcake', 305, 3.7, 67, 4.3,'da'),
createData('Donut', 452, 25.0, 51, 4.9,'da'),
createData('Eclair', 262, 16.0, 24, 6.0,'da'),
createData('Frozen yoghurt', 159, 6.0, 24, 4.0,'da'),
createData('Gingerbread', 356, 16.0, 49, 3.9,'da'),
createData('Honeycomb', 408, 3.2, 87, 6.5,'da'),
createData('Ice cream sandwich', 237, 9.0, 37, 4.3,'da'),
createData('Jelly Bean', 375, 0.0, 94, 0.0,'da'),
createData('KitKat', 518, 26.0, 65, 7.0,'da'),
createData('Lollipop', 392, 0.2, 98, 0.0,'da'),
createData('Marshmallow', 318, 0, 81, 2.0,'da'),
createData('Nougat', 360, 19.0, 9, 37.0,'da'),
createData('Oreo', 437, 18.0, 63, 4.0,'da'),
];
let tmp2 = [
{ id: 'a', numeric: false, disablePadding: true, label: 'a' },
{ id: 'b', numeric: true, disablePadding: false, label: 'b' },
{ id: 'c', numeric: true, disablePadding: false, label: 'c' },
{ id: 'd', numeric: true, disablePadding: false, label: 'd' },
{ id: 't', numeric: true, disablePadding: false, label: 'tdddddd' },
{ id: 'f', numeric: true, disablePadding: false, label: 'f' },
];
const login = {
"email":"admin@admin.com",
"username":"admin",
"password":"123mudar"
}
function App() {
var [screen, setScreen] = useState(false);
var [token, setToken] = useState(null);
return (screen)? (
<div className="App">
<Header> </Header>
<Upload></Upload>
</div>
) :
( <div className="App">
<Header> </Header>
<GerenciarTurma></GerenciarTurma>
</div> ) ;
}
export default App;
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';
......@@ -24,7 +27,7 @@ export default function AlertDialog(props) {
return (
<div>
<Button color="primary" style={props.initial_button_style} onClick={handleClickOpen}>
<Button startIcon={props.initial_icon} color="primary" style={props.initial_button_style} onClick={handleClickOpen}>
{props.initial_button_title}
</Button>
<Dialog
......
......@@ -16,6 +16,7 @@ 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'
import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
import Grid from '@material-ui/core/Grid';
......@@ -270,6 +271,13 @@ export function Header(props) {
const handleDrawerClose = () => {
setOpen(false);
};
const [w, setW] = React.useState(false);
function wizard() {
return (<Wizard handleClose={handleClose} iniState={1} />)
}
function handleClose() {
setW(false);
}
return (
<div className={classes.root}>
<AppBar position="static" className={classes.header}>
......@@ -285,14 +293,15 @@ export function Header(props) {
<Button color="inherit" className={classes.headerButton} >Resultado</Button>
<Button color="inherit" className={classes.headerButton} >Indicadores</Button>
<Button color="inherit" className={classes.headerButton} >Universidade</Button>*/}
<Button color="inherit" className={classes.headerButton} >Mapas</Button>
<IconButton edge="end" color="inherit" aria-label="searchBar" className={classes.headerButton} >
<SearchIcon />
</IconButton>
<Button color="inherit" href="http://www.campusmap.ufpr.br/" className={classes.headerButton} >Mapas</Button>
{ isAuthenticated() &&
<Button color="inherit" onClick={()=>setW(!w)} className={classes.headerButton} >{(!w)? "Ajuda" : "fechar ajuda"}</Button>
}
</Grid>
</Toolbar>
</AppBar>
<DrawerMenu open={open} handleDrawerOpen={handleDrawerOpen} handleDrawerClose={handleDrawerClose} />
{ w && wizard() }
</div>
)
}
......@@ -82,4 +82,3 @@ export function SelectField(props) {
/>
);
}
......@@ -90,8 +90,11 @@ export function Wizard(props) {
const [activeStep, setActiveStep] = React.useState(iniState);
const steps = getSteps();
function handleNext() {
setActiveStep(prevActiveStep => prevActiveStep + 1);
function handleNext() {
if (activeStep == steps.length -1)
props.handleClose()
else
setActiveStep(prevActiveStep => prevActiveStep + 1);
}
function handleBack() {
......
......@@ -5,4 +5,3 @@ export const MessageActive = React.createContext(false);
export const warn = 1
export const error = 2
export const success = 3
import React, {useState, useEffect,useContext} from 'react';
import {Messages,MessageActive} from "../messagesystem"
import AlertDialog from '../components/dialog/dialog';
import CallMergeIcon from '@material-ui/icons/CallMerge';
import TextField from '@material-ui/core/TextField';
import Divider from '@material-ui/core/Divider';
......@@ -16,6 +16,7 @@ import Grid from '@material-ui/core/Grid';
import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Button from '@material-ui/core/Button';
import {SelectField, Tags} from '../components/select/Select'
const BlocoSelect = React.createContext({ "bloco":"", "curso":"", "periodo":"", "vagas":0, });
const Change = React.createContext(false);
const useStyles = makeStyles(theme => ({
......@@ -94,7 +95,7 @@ export function HeaderBloco(props) {
const response = await api.delete(`blocos/${bloco_select.codigo}`);
setMessage("Bloco removido com sucesso")
setMessageActive(true)
} catch (e) {
setMessage("Erro ao tentar remover bloco: "+e)
setMessageActive(true)
......@@ -114,7 +115,12 @@ export function HeaderBloco(props) {
<Button onClick={addBloco} startIcon={<Add style={{color: "#636363", fontSize: "12px"}}/>} style={{color:"#676767", fontSize:"12px"}}>Adicionar bloco</Button>
</Grid>
<Grid item align="left">
<Button onClick={handleDelete} style={{color:"#676767", fontSize:"12px"}} startIcon={<DeleteOutline style={{color:"#676767", fontSize:"12px"}}/>}>Excluir</Button>
<AlertDialog title={"Confirmação de remoção do bloco selecionado"}
initial_button_style={{color:"#676767", fontSize:"12px"}}
initial_icon={<DeleteOutline style={{color:"#676767", fontSize:"12px"}}/>}
initial_button_title={"Excluir"}
handle_accept={handleDelete}
description={"Você realmente deseja remover o bloco selecionado? esta operação não pode ser desfeita"} />
</Grid>
</Grid>
</Grid>
......@@ -147,8 +153,12 @@ export function MenuInfo(props) {
const classes = useStyles();
const {bloco_select, setBlocoSelected} = useContext(BlocoSelect);
const handleChange = name => event => {
console.log(bloco_select)
setBlocoSelected({ ...bloco_select, [name]: event.target.value });
};
const handleChangeSelect = name => value => {
var _bloco = bloco_select;
_bloco[name] = value;
setBlocoSelected(_bloco)
};
return (
<Grid container align="left" direction="column" >
......@@ -160,10 +170,14 @@ export function MenuInfo(props) {
/>
</Grid>
<Grid item xs={12} >
<InputField
label="Setor"
value={bloco_select.setorCod}
func={handleChange('setorCod')}
<SelectField
suggestions={Object.values(props.obj.setores)}
label={"Setor"}
placeholder={"Nome do setor"}
index={"nome"}
index_value={"codigo"}
defaultValue={props.obj.setores[bloco_select.setorCod]}
func={handleChangeSelect('setorCod')}
/>
</Grid>
<Grid item xs={12} >
......@@ -176,14 +190,14 @@ export function MenuInfo(props) {
<Grid item xs={12} >
<Grid container spacing={4} >
<Grid item xs={6} >
<InputField
<InputField
label="Latitude"
value={bloco_select.latitude}
func={handleChange('latitude')}
/>
</Grid>
<Grid item xs={6} >
<InputField
<InputField
label="Longetidude"
value={bloco_select.longitude}
func={handleChange('longitude')}
......@@ -217,7 +231,12 @@ export function ListBloco(props) {
var setor = props.setor
var blocos_list = [];
blocos.map((i,index) => {
var localizacao = (i.localizacao)? i.localizacao.lat + " " + i.localizacao.lng : ""
var localizacao = "";
if (i.localizacao) {
localizacao = i.localizacao.lat + " " + i.localizacao.lng
i.latitude = i.localizacao.lat
i.longitude = i.localizacao.lng
}
blocos_list.push(createBlocoList(index,i.codigo,i.nome,localizacao,));
});
return (
......@@ -241,7 +260,7 @@ export function Bloco(props) {
bloco.latitude = bloco.localizacao.lat;
bloco.longitude = bloco.localizacao.lng;
}
})
setBlocos(_blocos);
};
......@@ -278,7 +297,7 @@ export function Menu(props) {
const result = await api.put("blocos",bloco_select);
setMessage("Bloco criado ou atualizado com sucesso")
setMessageActive(true);
} catch (e) {
setMessage("Erro ao tentar criar ou atualizar bloco: "+e)
setMessageActive(true);
......@@ -294,7 +313,7 @@ export function Menu(props) {
<Grid container className={classes.container} direction="column" spacing={2}>
<Grid item xs={12} >
<MenuInfo ></MenuInfo>
<MenuInfo obj={props.obj}></MenuInfo>
</Grid>
<Grid item xs={12} > {/* Linha divisoria */}
......@@ -315,13 +334,21 @@ export function GerenciarBloco (props) {
const classes = useStyles();
var [query, setQuery] = useState("[where][codigo]=exatas")
var [setors, setSetors] = useState([])
const [obj, setObj] = useState({"setores":{}});
var [bloco_select, setBlocoSelect] = useState({});
var [change, setChange] = useState(false);
//get data from api
useEffect(() => {
const fetchData = async () => {
const result = await api.get(`setores`,);
var __data = {}
var _obj = obj;
for(var i=0; i<result.data.length; i++) {
__data[result.data[i].codigo] = result.data[i]
}
_obj["setores"] = __data;
setSetors(result.data);
setObj(_obj);
};
fetchData();},[query,change])
function setBlocoSelected(bloco){
......@@ -350,7 +377,7 @@ export function GerenciarBloco (props) {
</Grid>
<Grid item xs={4} md={4} sm={4} lg={3}> {/* menu */}
<Menu setBlocoSelect={setBlocoSelect} codigo_bloco={bloco_select.nome}></Menu>
<Menu obj={obj} setBlocoSelect={setBlocoSelect} codigo_bloco={bloco_select.nome}></Menu>
</Grid>
</Grid>
</div>
......
This diff is collapsed.
This diff is collapsed.
import React, {useState, useEffect,useContext} from 'react';
import {SelectField, Tags} from '../components/select/Select'
import AlertDialog from '../components/dialog/dialog';
import CallMergeIcon from '@material-ui/icons/CallMerge';
import {Messages,MessageActive} from "../messagesystem"
import TextField from '@material-ui/core/TextField';
......@@ -95,7 +96,7 @@ export function HeaderDepartamento(props) {
const response = await api.delete(`departamentos/${departamento_select.codigo}`);
setMessage("Departamento removido com sucesso")
setMessageActive(true)
} catch (e) {
setMessage("Erro ao tentar remover departamento: "+e)
setMessageActive(true)
......@@ -114,7 +115,12 @@ export function HeaderDepartamento(props) {
<Button onClick={addDepartamento} startIcon={<Add style={{color: "#636363", fontSize: "12px"}}/>} style={{color:"#676767", fontSize:"12px"}}>Adicionar departamento</Button>
</Grid>
<Grid item align="left">
<Button onClick={handleDelete} style={{color:"#676767", fontSize:"12px"}} startIcon={<DeleteOutline style={{color:"#676767", fontSize:"12px"}}/>}>Excluir</Button>
<AlertDialog title={"Confirmação de remoção do departamento selecionado"}
initial_button_style={{color:"#676767", fontSize:"12px"}}
initial_icon={<DeleteOutline style={{color:"#676767", fontSize:"12px"}}/>}
initial_button_title={"Excluir"}
handle_accept={handleDelete}
description={"Você realmente deseja remover o departamento selecionado? esta operação não pode ser desfeita"} />
</Grid>
</Grid>
</Grid>
......@@ -149,6 +155,11 @@ export function MenuInfo(props) {
const handleChange = name => event => {
console.log(departamento_select)
setDepartamentoSelected({ ...departamento_select, [name]: event.target.value });
};
const handleChangeSelect = name => value => {
var _departamento = departamento_select;
_departamento[name] = value;
setDepartamentoSelected(_departamento)
};
return (
<Grid container align="left" direction="column" >
......@@ -160,10 +171,14 @@ export function MenuInfo(props) {
/>
</Grid>
<Grid item xs={12} >
<InputField
label="Setor"
value={departamento_select.setorCod}
func={handleChange('setorCod')}
<SelectField
suggestions={Object.values(props.obj.setores)}
label={"Setor"}
placeholder={"Nome do setor"}
index={"nome"}
index_value={"codigo"}
defaultValue={props.obj.setores[departamento_select.setorCod]}
func={handleChangeSelect('setorCod')}
/>
</Grid>
<Grid item xs={12} >
......@@ -176,14 +191,14 @@ export function MenuInfo(props) {
<Grid item xs={12} >
<Grid container spacing={4} >
<Grid item xs={6} >
<InputField
<InputField
label="Latitude"
value={departamento_select.latitude}
func={handleChange('latitude')}
/>
</Grid>
<Grid item xs={6} >
<InputField
<InputField
label="Longetidude"
value={departamento_select.longitude}
func={handleChange('longitude')}
......@@ -241,7 +256,7 @@ export function Departamento(props) {
departamento.latitude = departamento.localizacao.lat;
departamento.longitude = departamento.localizacao.lng;
}
})
setDepartamentos(_departamentos);
};
......@@ -278,7 +293,7 @@ export function Menu(props) {
const result = await api.put("departamentos",departamento_select);
setMessage("Departamento criado ou atualizado com sucesso")
setMessageActive(true);
} catch (e) {
setMessage("Erro ao tentar criar ou atualizar departamento: "+e)
setMessageActive(true);
......@@ -294,7 +309,7 @@ export function Menu(props) {
<Grid container className={classes.container} direction="column" spacing={2}>
<Grid item xs={12} >
<MenuInfo ></MenuInfo>
<MenuInfo obj={props.obj}></MenuInfo>
</Grid>
<Grid item xs={12} > {/* Linha divisoria */}
......@@ -315,13 +330,21 @@ export function GerenciarDepartamento (props) {
const classes = useStyles();
var [query, setQuery] = useState("[where][codigo]=exatas")
var [setors, setSetors] = useState([])
const [obj, setObj] = useState({"setores":{}});
var [departamento_select, setDepartamentoSelect] = useState({});
var [change, setChange] = useState(false);
//get data from api
useEffect(() => {
const fetchData = async () => {
const result = await api.get(`setores`,);
var __data = {}
var _obj = obj;
for(var i=0; i<result.data.length; i++) {
__data[result.data[i].codigo] = result.data[i]
}
_obj["setores"] = __data;
setSetors(result.data);
setObj(_obj);
};
fetchData();},[query,change])
function setDepartamentoSelected(departamento){
......@@ -350,7 +373,7 @@ export function GerenciarDepartamento (props) {
</Grid>
<Grid item xs={4} md={4} sm={4} lg={3}> {/* menu */}
<Menu setDepartamentoSelect={setDepartamentoSelect} codigo_departamento={departamento_select.nome}></Menu>
<Menu obj={obj} setDepartamentoSelect={setDepartamentoSelect} codigo_departamento={departamento_select.nome}></Menu>
</Grid>
</Grid>
</div>
......
This diff is collapsed.
......@@ -100,7 +100,7 @@ export function HeaderEnsalamento(props) {
const response = await api.delete(`semestres/${ensalamento_select.semestre}`);
setMessage("Ensalamento removido com sucesso")
setMessageActive(true)
} catch (e) {
setMessage("erro ao tentar remover semestre: "+e)
setMessageActive(true)
......@@ -158,7 +158,7 @@ export function MenuInfo(props) {
const result = await api.post("ensalamentos/ensalar");
setMessage("Requisição de ensalar enviado com sucesso")
setMessageActive(true)
} catch (e) {
setMessage("Erro ao tentar ensalar: "+e)
setMessageActive(true)
......@@ -171,7 +171,7 @@ export function MenuInfo(props) {
const result = await api.put("semestres",ensalamento_select);
setMessage("Ensalamento publicado")
setMessageActive(true)
} catch (e) {
setMessage("Erro ao tentar publicar: "+e)
setMessageActive(true)
......@@ -183,7 +183,7 @@ export function MenuInfo(props) {
return (
<Grid container align="left" direction="column" >
<Grid item xs={12} >
<InputField
<InputField
label="Semestre"
value={ensalamento_select.semestre}
func={handleChange('semestre')}
......@@ -274,7 +274,7 @@ export function Ensalamento(props) {
return () => clearInterval(2000);
},[change])
return (
return (
<Grid container justify="flex-end" spacing={2} direction="column">
<div>
<Grid item >
......@@ -335,7 +335,7 @@ export function GerenciarEnsalador (props) {
</Grid>
</Grid>
<Grid container direction="row" spacing={4} >
<Grid item xs={8} md={8} lg={9} sm={8}>
<Grid item xs={8} md={8} lg={9} sm={8}>
<Grid container direction="column" justify="flex-start" spacing={4} >
<Grid item >
<Ensalamento />
......
......@@ -96,7 +96,7 @@ export function HeaderProfessor(props) {
const response = await api.delete(`professores/${professor_select.codigo}`);
setMessage("Professor removido com sucesso")
setMessageActive(true)
} catch (e) {
setMessage("Erro ao tentar remover professor: "+e)
setMessageActive(true)
......
This diff is collapsed.
......@@ -96,7 +96,7 @@ export function HeaderSetor(props) {
const {message,setMessage} = React.useContext(Messages);
async function handleDelete() {
try {
const response = await api.delete(`setores/${setor_select.id}`);
setMessage("Setor removido com sucesso")
setMessageActive(true)
......@@ -155,14 +155,14 @@ export function MenuInfo(props) {
<Grid container align="left" direction="column" >
<Grid container direction="row" spacing={4}>
<Grid item xs={6} >
<InputField
<InputField
label="Código"
value={setor_select.codigo}
func={handleChange('codigo')}
/>
</Grid>
<Grid item xs={6} >
<InputField
<InputField
label="Nome"
value={setor_select.nome}
func={handleChange('nome')}
......@@ -170,7 +170,7 @@ export function MenuInfo(props) {
</Grid>
</Grid>
<Grid item xs={12} >
<InputField
<InputField
label="Email"
tipo="email"
value={setor_select.email}
......@@ -178,7 +178,7 @@ export function MenuInfo(props) {
/>
</Grid>
<Grid item >
<InputField
<InputField
label="Website"
value={setor_select.website}
func={handleChange('website')}
......@@ -186,14 +186,14 @@ export function MenuInfo(props) {
</Grid>
<Grid container direction="row" spacing={4}>
<Grid item xs={6} >
<InputField
<InputField
label="Latitude"
value={setor_select.latitude}
func={handleChange('latitude')}
/>
</Grid>
<Grid item xs={6} >
<InputField
<InputField
label="Longetidude"
value={setor_select.longitude}
func={handleChange('longitude')}
......@@ -253,7 +253,7 @@ export function Setor(props) {
setSetores(_setores);
};
fetchData();},[change])
return (
return (
<Grid container justify="flex-end" spacing={2} direction="column">
<div>
<Grid item >
......@@ -284,7 +284,7 @@ export function Menu(props) {
const result = await api.put(`setores`,setor_select);
setMessage("Setor criado ou atualizado com sucesso")
setMessageActive(true);
} catch (e) {
setMessage("Erro ao tentar criar ou atualizar setor: "+e)
setMessageActive(true);
......@@ -308,7 +308,7 @@ export function Menu(props) {
<Grid item align="right">
<Button onClick={salvahandle} style={{color:"#5E8D37",fontSize:"14px"}}>Salvar</Button>
</Grid>
</Grid>
</Grid>
</Paper>
......@@ -335,7 +335,7 @@ export function GerenciarSetores (props) {
</Grid>
</Grid>
<Grid container direction="row" spacing={4} >