Skip to content
Snippets Groups Projects
Commit f51b02a7 authored by lfr20's avatar lfr20
Browse files

Fixed bugs

parent f935564b
No related branches found
No related tags found
1 merge request!46Gamefication admin
......@@ -47,7 +47,7 @@ import { getRequest, deleteRequest } from '../../../../Components/HelperFunction
//Filters
import { Url, DeleteFilter } from "../../../Filters";
//router
import { Link } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import styled from "styled-components"
import AccountBalanceRoundedIcon from "@material-ui/icons/AccountBalanceRounded";
......@@ -69,24 +69,9 @@ const StyledTableRow = withStyles((theme) => ({
},
}))(TableRow);
const useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1,
},
paper: {
padding: theme.spacing(1),
textAlign: "start",
},
button: {
margin: theme.spacing(1),
alignSelf: "flex-end",
},
}));
const Institutions = () => {
const classes = useStyles();
const WINDOW_WIDTH = window.innerWidth
const router = useHistory()
const ADD_ONE_LENGHT = [""];
const [error, setError] = useState(null); //Necessary to consult the API, catch errors
......@@ -344,6 +329,14 @@ const Institutions = () => {
setShowFilter(!showFilter);
},
icon: <FilterListRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/InstitutionCreate')
},
icon: <AddRoundedIcon />
}
]}
>
......@@ -486,6 +479,14 @@ const Institutions = () => {
setShowFilter(!showFilter);
},
icon: <FilterListRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/InstitutionCreate')
},
icon: <AddRoundedIcon />
}
]}
>
......
......@@ -41,7 +41,7 @@ import UpdateRoundedIcon from '@material-ui/icons/UpdateRounded';
import EditRoundedIcon from '@material-ui/icons/EditRounded';
import DeleteRoundedIcon from '@material-ui/icons/DeleteRounded';
//router
import { Link } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import styled from "styled-components"
import LanguageRoundedIcon from "@material-ui/icons/LanguageRounded";
......@@ -67,6 +67,7 @@ const Languages = () => {
const ADD_ONE_LENGHT = [""];
const TOP_LABELS = ['ID', 'NOME', 'CODE', 'EDITAR', 'DELETAR'] //Labels from Table
const WINDOW_WIDTH = window.innerWidth
const router = useHistory()
const [error, setError] = useState(null); //Necessary to consult the API, catch errors
const [isLoaded, setIsLoaded] = useState(false); //Necessary to consult the API, wait until complete
......@@ -226,6 +227,14 @@ const Languages = () => {
},
icon: <UpdateRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/languageCreate')
},
icon: <AddRoundedIcon />
}
]}
>
</MobilePageHeader>
......@@ -323,6 +332,14 @@ const Languages = () => {
},
icon: <UpdateRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/languageCreate')
},
icon: <AddRoundedIcon />
}
]}
>
</PageHeader>
......
......@@ -40,7 +40,7 @@ import UpdateRoundedIcon from '@material-ui/icons/UpdateRounded';
import EditRoundedIcon from '@material-ui/icons/EditRounded';
import DeleteRoundedIcon from '@material-ui/icons/DeleteRounded';
//router
import { Link } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import styled from "styled-components"
import AccountCircleRoundedIcon from "@material-ui/icons/AccountCircleRounded"
......@@ -66,6 +66,7 @@ const UserPermissions = () => {
const ADD_ONE_LENGHT = [""];
const TOP_LABELS = ['ID', 'NOME', 'DESCRIÇÃO', 'AÇÕES'] //Labels from Table
const WINDOW_WIDTH = window.innerWidth
const router = useHistory()
const [error, setError] = useState(null); //Necessary to consult the API, catch errors
const [isLoaded, setIsLoaded] = useState(false); //Necessary to consult the API, wait until complete
......@@ -223,6 +224,14 @@ const UserPermissions = () => {
},
icon: <UpdateRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/CreateRole')
},
icon: <AddRoundedIcon />
}
]}
>
</MobilePageHeader>
......@@ -318,6 +327,14 @@ const UserPermissions = () => {
},
icon: <UpdateRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/CreateRole')
},
icon: <AddRoundedIcon />
}
]}
>
</PageHeader>
......
......@@ -40,7 +40,7 @@ import AddRoundedIcon from '@material-ui/icons/AddRounded';
import UpdateRoundedIcon from '@material-ui/icons/UpdateRounded';
import Switch from '@material-ui/core/Switch';
//router
import { Link } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import styled from "styled-components"
import HelpRoundedIcon from "@material-ui/icons/HelpRounded";
......@@ -68,6 +68,7 @@ const Questions = () => {
const ADD_ONE_LENGHT = [""];
const WINDOW_WIDTH = window.innerWidth
const TOP_LABELS = ['ID', 'CRIAÇÃO EM', 'DESCRIÇÃO', 'STATUS', 'ATUALIZAÇÃO EM'] //Labels from Table
const router = useHistory()
const [error, setError] = useState(null); //Necessary to consult the API, catch errors
const [isLoaded, setIsLoaded] = useState(false); //Necessary to consult the API, wait until complete
......@@ -230,7 +231,7 @@ const Questions = () => {
/>
<MobilePageHeader
title="Questões da curadoria"
title="Perguntas da curadoria"
actions={[
{
name: "Atualizar",
......@@ -240,6 +241,13 @@ const Questions = () => {
},
icon: <UpdateRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/CreateQuestion')
},
}
]}
>
</MobilePageHeader>
......@@ -334,7 +342,7 @@ const Questions = () => {
/>
<PageHeader
title="Questões da curadoria"
title="Perguntas da curadoria"
actions={[
{
name: "Atualizar",
......@@ -344,6 +352,13 @@ const Questions = () => {
},
icon: <UpdateRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/CreateQuestion')
},
}
]}
>
</PageHeader>
......
......@@ -44,7 +44,7 @@ import { Url } from '../../../Filters';
import { DeleteFilter } from '../../../Filters';
import { getRequest, deleteRequest } from '../../../../Components/HelperFunctions/getAxiosConfig'
//routers
import { Link } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import StarRoundedIcon from "@material-ui/icons/StarRounded";
import styled from "styled-components"
......@@ -69,6 +69,7 @@ const StyledTableRow = withStyles((theme) => ({
const Ratings = () => {
const WINDOW_WIDTH = window.innerWidth
const ADD_ONE_LENGHT = [""];
const router = useHistory()
const [error, setError] = useState(null); //Necessary to consult the API, catch errors
const [isLoaded, setIsLoaded] = useState(false); //Necessary to consult the API, wait until complete
......@@ -229,6 +230,14 @@ const Ratings = () => {
},
icon: <UpdateRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/CreateRating')
},
icon: <AddRoundedIcon />
}
]}
>
</MobilePageHeader>
......@@ -325,6 +334,14 @@ const Ratings = () => {
},
icon: <UpdateRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/CreateRating')
},
icon: <AddRoundedIcon />
}
]}
>
</PageHeader>
......
......@@ -42,7 +42,7 @@ import PageHeader from "../../../Components/Components/PageHeader"
import { getRequest, putRequest } from '../../../../Components/HelperFunctions/getAxiosConfig'
import { Url } from '../../../Filters';
//routers
import { Link } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import moment from 'moment';
import styled from 'styled-components'
import EmailRoundedIcon from '@material-ui/icons/EmailRounded';
......@@ -69,6 +69,7 @@ const StyledTableRow = withStyles((theme) => ({
const Users = () => {
const ADD_ONE_LENGHT = [''];
const router = useHistory()
const WINDOW_WIDTH = window.innerWidth
const [error, setError] = useState(null); //Necessary to consult the API, catch errors
const [isLoaded, setIsLoaded] = useState(false); //Necessary to consult the API, wait until complete
......@@ -265,6 +266,13 @@ const Users = () => {
setShowFilter(!showFilter);
},
icon: <FilterListRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/EditUser/-1')
},
}
]}
>
......@@ -426,6 +434,13 @@ const Users = () => {
setShowFilter(!showFilter);
},
icon: <FilterListRoundedIcon />
},
{
name: "Novo",
isLoading: false,
func: () => {
router.push('/admin/EditUser/-1')
},
}
]}
>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment