aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports
diff options
context:
space:
mode:
authorAshutosh Bishnoi <mail2bishnoi@gmail.com>2020-11-01 18:46:06 +0530
committerAshutosh Bishnoi <mail2bishnoi@gmail.com>2020-11-01 18:46:06 +0530
commit8c167d82b75b764d3b12845aae7827550607a148 (patch)
tree982912b66e297bb8c09c3e9413e7d7f1bda7e882 /modern/src/reports
parent71892bfca5c4c7fe6d691aaf84baaae54c335939 (diff)
downloadetbsa-traccar-web-8c167d82b75b764d3b12845aae7827550607a148.tar.gz
etbsa-traccar-web-8c167d82b75b764d3b12845aae7827550607a148.tar.bz2
etbsa-traccar-web-8c167d82b75b764d3b12845aae7827550607a148.zip
Revert all the code formatting applied by vscode
Diffstat (limited to 'modern/src/reports')
-rw-r--r--modern/src/reports/EventReportPage.js28
-rw-r--r--modern/src/reports/ReportFilter.js19
2 files changed, 17 insertions, 30 deletions
diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js
index 0a451c1..4134de3 100644
--- a/modern/src/reports/EventReportPage.js
+++ b/modern/src/reports/EventReportPage.js
@@ -1,21 +1,11 @@
import React, { useState } from 'react';
import MainToolbar from '../MainToolbar';
-import {
- Grid,
- TableContainer,
- Table,
- TableRow,
- TableCell,
- TableHead,
- TableBody,
- Paper,
- makeStyles,
-} from '@material-ui/core';
+import { Grid, TableContainer, Table, TableRow, TableCell, TableHead, TableBody, Paper, makeStyles } from '@material-ui/core';
import t from '../common/localization';
import { formatPosition } from '../common/formatter';
import ReportFilter from './ReportFilter';
-const useStyles = makeStyles((theme) => ({
+const useStyles = makeStyles(theme => ({
root: {
height: '100%',
display: 'flex',
@@ -41,14 +31,14 @@ const EventReportPage = () => {
from: from.toISOString(),
to: to.toISOString(),
});
- fetch(`/api/reports/events?${query.toString()}`, {
- headers: { Accept: 'application/json' },
- }).then((response) => {
- if (response.ok) {
- response.json().then(setData);
+
+ fetch(`/api/reports/events?${query.toString()}`, { headers: { Accept: 'application/json' } })
+ .then((response) => {
+ if (response.ok) {
+ response.json().then(setData);
}
});
- };
+ }
return (
<div className={classes.root}>
@@ -90,6 +80,6 @@ const EventReportPage = () => {
</div>
</div>
);
-};
+}
export default EventReportPage;
diff --git a/modern/src/reports/ReportFilter.js b/modern/src/reports/ReportFilter.js
index 55f73e3..6f24804 100644
--- a/modern/src/reports/ReportFilter.js
+++ b/modern/src/reports/ReportFilter.js
@@ -1,12 +1,5 @@
import React, { useState } from 'react';
-import {
- FormControl,
- InputLabel,
- Select,
- MenuItem,
- Button,
- TextField,
-} from '@material-ui/core';
+import { FormControl, InputLabel, Select, MenuItem, Button, TextField } from '@material-ui/core';
import t from '../common/localization';
import { useSelector } from 'react-redux';
import moment from 'moment';
@@ -17,6 +10,7 @@ const ReportFilter = (props) => {
const [period, setPeriod] = useState('today');
const [from, setFrom] = useState(moment().subtract(1, 'hour'));
const [to, setTo] = useState(moment());
+
const handleShow = () => {
let selectedFrom;
let selectedTo;
@@ -52,7 +46,9 @@ const ReportFilter = (props) => {
}
props.handleSubmit(deviceId, selectedFrom, selectedTo);
- };
+
+ }
+
return (
<>
<FormControl variant="filled" margin="normal" fullWidth>
@@ -114,6 +110,7 @@ const ReportFilter = (props) => {
</FormControl>
</>
);
-};
+
+}
-export default ReportFilter;
+export default ReportFilter; \ No newline at end of file