aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/ReportView.js
diff options
context:
space:
mode:
authorAshutosh Bishnoi <mail2bishnoi@gmail.com>2020-11-08 12:15:17 +0530
committerAshutosh Bishnoi <mail2bishnoi@gmail.com>2020-11-08 12:15:17 +0530
commit449e5e3190d22704a2cb4d7c5ce3e90eaaf16153 (patch)
treeed7a25b1e859f6155d505bab164455454315dc0c /modern/src/reports/ReportView.js
parentd706803b28ffba0e07de48292a732526ed9d34bd (diff)
downloadtrackermap-web-449e5e3190d22704a2cb4d7c5ce3e90eaaf16153.tar.gz
trackermap-web-449e5e3190d22704a2cb4d7c5ce3e90eaaf16153.tar.bz2
trackermap-web-449e5e3190d22704a2cb4d7c5ce3e90eaaf16153.zip
Report Layout Unification with seperate report layout component
Diffstat (limited to 'modern/src/reports/ReportView.js')
-rw-r--r--modern/src/reports/ReportView.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/modern/src/reports/ReportView.js b/modern/src/reports/ReportView.js
new file mode 100644
index 00000000..249ef724
--- /dev/null
+++ b/modern/src/reports/ReportView.js
@@ -0,0 +1,47 @@
+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 ReportView= ({ reportFilterForm:ReportFilterForm, reportListView:ReportListView }) => {
+ const classes = useStyles();
+ const [data, setData] = useState([]);
+
+ const onResult = (data) => {
+ setData(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}>
+ <ReportListView items={ data } />
+ </Grid>
+ </Grid>
+ </div>
+ </div>
+ );
+}
+
+export default ReportView;