diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-11-10 09:22:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 09:22:39 -0800 |
commit | 2ead5e0a6ab859ac3436f378a1fec126e493c69b (patch) | |
tree | 9187834b5246734da8549735f64d2e5546c60e1e /modern/src/reports/ReportLayoutPage.js | |
parent | 1af1545dc7ba3cfdf73a58031b37bea0ecff2e54 (diff) | |
parent | a948981184f4f2884b7a35b67b2389ddcd1f52a8 (diff) | |
download | trackermap-web-2ead5e0a6ab859ac3436f378a1fec126e493c69b.tar.gz trackermap-web-2ead5e0a6ab859ac3436f378a1fec126e493c69b.tar.bz2 trackermap-web-2ead5e0a6ab859ac3436f378a1fec126e493c69b.zip |
Merge pull request #791 from mail2bishnoi/events-report
Added Event report with Report Filter as a seperate component
Diffstat (limited to 'modern/src/reports/ReportLayoutPage.js')
-rw-r--r-- | modern/src/reports/ReportLayoutPage.js | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/modern/src/reports/ReportLayoutPage.js b/modern/src/reports/ReportLayoutPage.js new file mode 100644 index 00000000..57a2cefd --- /dev/null +++ b/modern/src/reports/ReportLayoutPage.js @@ -0,0 +1,46 @@ +import React, { useState } from 'react'; +import { Grid, Paper, makeStyles } from '@material-ui/core'; +import MainToolbar from '../MainToolbar'; + +const useStyles = makeStyles(theme => ({ + root: { + height: '100%', + display: 'flex', + flexDirection: 'column', + }, + content: { + flex: 1, + overflow: 'auto', + padding: theme.spacing(2), + }, + form: { + padding: theme.spacing(1, 2, 2), + }, +})); + +const ReportLayoutPage = ({ reportFilterForm:ReportFilterForm, setItems, ...rest }) => { + const classes = useStyles(); + + const onResult = (data) => { + setItems(data); + } + return ( + <div className={classes.root}> + <MainToolbar /> + <div className={classes.content}> + <Grid container spacing={2}> + <Grid item xs={12} md={3} lg={2}> + <Paper className={classes.form}> + <ReportFilterForm onResult={ onResult } /> + </Paper> + </Grid> + <Grid item xs={12} md={9} lg={10}> + {rest.children} + </Grid> + </Grid> + </div> + </div> + ); +} + +export default ReportLayoutPage; |