aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/ReportLayoutPage.js
diff options
context:
space:
mode:
authorAshutosh Bishnoi <mail2bishnoi@gmail.com>2020-12-02 11:09:08 +0530
committerAshutosh Bishnoi <mail2bishnoi@gmail.com>2020-12-02 11:09:08 +0530
commitb497c4fbf7caabd38b902d225ae0229b33323309 (patch)
tree885e43fc34d0caae8538bceb538ff4835ceca1b2 /modern/src/reports/ReportLayoutPage.js
parent3b066354210c22fff82f40ce3d30521d55d81533 (diff)
downloadtrackermap-web-b497c4fbf7caabd38b902d225ae0229b33323309.tar.gz
trackermap-web-b497c4fbf7caabd38b902d225ae0229b33323309.tar.bz2
trackermap-web-b497c4fbf7caabd38b902d225ae0229b33323309.zip
Chart report layout refactoring
Diffstat (limited to 'modern/src/reports/ReportLayoutPage.js')
-rw-r--r--modern/src/reports/ReportLayoutPage.js23
1 files changed, 3 insertions, 20 deletions
diff --git a/modern/src/reports/ReportLayoutPage.js b/modern/src/reports/ReportLayoutPage.js
index 51e41010..67dff5a4 100644
--- a/modern/src/reports/ReportLayoutPage.js
+++ b/modern/src/reports/ReportLayoutPage.js
@@ -1,7 +1,6 @@
import React from 'react';
-import { Grid, Paper, makeStyles, FormControl, InputLabel, Select, MenuItem } from '@material-ui/core';
+import { Grid, Paper, makeStyles } from '@material-ui/core';
import MainToolbar from '../MainToolbar';
-import t from '../common/localization';
const useStyles = makeStyles(theme => ({
root: {
@@ -17,13 +16,9 @@ const useStyles = makeStyles(theme => ({
form: {
padding: theme.spacing(1, 2, 2),
},
- chart: {
- padding: theme.spacing(1, 2, 2),
- marginTop: theme.spacing(1),
- },
}));
-const ReportLayoutPage = ({ reportFilterForm:ReportFilterForm, setItems, type, setType, showChartType, children }) => {
+const ReportLayoutPage = ({ reportFilterForm:ReportFilterForm, setItems, type, setType, children }) => {
const classes = useStyles();
return (
<div className={classes.root}>
@@ -32,20 +27,8 @@ const ReportLayoutPage = ({ reportFilterForm:ReportFilterForm, setItems, type, s
<Grid container spacing={2}>
<Grid item xs={12} md={3} lg={2}>
<Paper className={classes.form}>
- <ReportFilterForm setItems={ setItems } />
+ <ReportFilterForm setItems={ setItems } type={ type } setType={ setType }/>
</Paper>
- {showChartType && (
- <Paper className={classes.chart}>
- <FormControl variant="filled" margin="normal" fullWidth>
- <InputLabel>{t('reportChartType')}</InputLabel>
- <Select value={type} onChange={e => setType(e.target.value)}>
- <MenuItem value="speed">{t('positionSpeed')}</MenuItem>
- <MenuItem value="accuracy">{t('positionAccuracy')}</MenuItem>
- <MenuItem value="altitude">{t('positionAltitude')}</MenuItem>
- </Select>
- </FormControl>
- </Paper>
- )}
</Grid>
<Grid item xs={12} md={9} lg={10}>
{children}