Skip to content
Snippets Groups Projects
Commit 13a1ee63 authored by Stephanie Briere Americo's avatar Stephanie Briere Americo
Browse files

Merge branch 'issue/21' into 'development'

Issue #21: Minor fix on listForms responsivity

See merge request !23
parents 2f314a14 7d75298c
No related branches found
No related tags found
3 merge requests!58Version 1.1,!54Issue #53: Fix password info,!23Issue #21: Minor fix on listForms responsivity
......@@ -2,11 +2,11 @@ import React, { useState, useEffect } from "react";
import Button from "@material-ui/core/Button";
import FormControl from "@material-ui/core/FormControl";
import Grid from "@material-ui/core/Grid";
import InputLabel from "@material-ui/core/InputLabel";
import MenuItem from "@material-ui/core/MenuItem";
import Select from "@material-ui/core/Select";
import FormHelperText from "@material-ui/core/FormHelperText";
import SearchBar from "./SearchBar.jsx";
import { useHistory } from "react-router-dom";
import { makeStyles } from "@material-ui/core/styles";
const useStyles = makeStyles(theme => ({
......@@ -68,6 +68,7 @@ const useStyles = makeStyles(theme => ({
function Tab(props) {
const classes = useStyles();
const history = useHistory();
const [seletectedValue, setseletectedValue] = React.useState("");
/** Function to handle event */
......
......@@ -8,8 +8,13 @@ import { makeStyles } from "@material-ui/core/styles";
// Components
import CardForm from "../components/fieldsListForms/CardForm.jsx";
import Tab from "../components/fieldsListForms/Tab.jsx";
const useStyles = makeStyles(theme => ({
body: {
marginBottom: "15%"
}
}));
export default function ListForms() {
const classes = useStyles();
// Get the ID from the URL
const { id } = useParams();
......@@ -38,9 +43,12 @@ export default function ListForms() {
const tmp = [...forms].sort((a, b) => a.answersNumber < b.answersNumber);
setAuxForms(tmp);
} else if (type === 4) {
let tmp = [...forms].filter(value => {
let tmp = [...forms]
.filter(value => {
return value.date;
}).sort((a, b) => a.date > b.date).concat(
})
.sort((a, b) => a.date > b.date)
.concat(
[...forms].filter(value => {
return value.date === "";
})
......@@ -81,7 +89,7 @@ export default function ListForms() {
<div>
<Tab sort={sort} searching={searching} />
<Container>
<Grid container spacing={3}>
<Grid container spacing={3} className={classes.body}>
{auxForms.map(form => (
<Grid item xl={4} lg={4} md={4} sm={6} xs={12} zeroMinWidth>
<CardForm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment