aboutsummaryrefslogtreecommitdiff
path: root/modern/src/admin/StatisticsPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-07-10 15:24:10 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-07-10 15:24:10 -0700
commit0512964d71a25c172735f2149ef60c3a8b20f683 (patch)
treef47b42326a7e6a0eaa2715ca8066cb3ca7e7bb90 /modern/src/admin/StatisticsPage.js
parent627cf95d59f625dcb0544bfd4c067d99dee4bb93 (diff)
downloadtrackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.tar.gz
trackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.tar.bz2
trackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.zip
Use modified airbnb eslint
Diffstat (limited to 'modern/src/admin/StatisticsPage.js')
-rw-r--r--modern/src/admin/StatisticsPage.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/modern/src/admin/StatisticsPage.js b/modern/src/admin/StatisticsPage.js
index 1e440a46..131ab7e4 100644
--- a/modern/src/admin/StatisticsPage.js
+++ b/modern/src/admin/StatisticsPage.js
@@ -1,10 +1,11 @@
-
import React, { useState } from 'react';
-import { FormControl, InputLabel,Select, MenuItem, TextField, Button, TableContainer, Table, TableRow, TableCell, TableHead, TableBody, Paper } from '@material-ui/core';
+import {
+ FormControl, InputLabel, Select, MenuItem, TextField, Button, TableContainer, Table, TableRow, TableCell, TableHead, TableBody, Paper,
+} from '@material-ui/core';
+import moment from 'moment';
import t from '../common/localization';
import { formatDate } from '../common/formatter';
import ReportLayoutPage from '../reports/ReportLayoutPage';
-import moment from 'moment';
const Filter = ({ setItems }) => {
const [period, setPeriod] = useState('today');
@@ -50,7 +51,7 @@ const Filter = ({ setItems }) => {
if (response.ok) {
setItems(await response.json());
}
- }
+ };
return (
<>
@@ -73,8 +74,9 @@ const Filter = ({ setItems }) => {
label={t('reportFrom')}
type="datetime-local"
value={from.format(moment.HTML5_FMT.DATETIME_LOCAL)}
- onChange={e => setFrom(moment(e.target.value, moment.HTML5_FMT.DATETIME_LOCAL))}
- fullWidth />
+ onChange={(e) => setFrom(moment(e.target.value, moment.HTML5_FMT.DATETIME_LOCAL))}
+ fullWidth
+ />
)}
{period === 'custom' && (
<TextField
@@ -83,16 +85,16 @@ const Filter = ({ setItems }) => {
label={t('reportTo')}
type="datetime-local"
value={to.format(moment.HTML5_FMT.DATETIME_LOCAL)}
- onChange={e => setTo(moment(e.target.value, moment.HTML5_FMT.DATETIME_LOCAL))}
- fullWidth />
+ onChange={(e) => setTo(moment(e.target.value, moment.HTML5_FMT.DATETIME_LOCAL))}
+ fullWidth
+ />
)}
<Button variant="contained" color="primary" onClick={handleClick} fullWidth>{t('reportShow')}</Button>
- </>
- )
-}
+ </>
+ );
+};
const StatisticsPage = () => {
-
const [items, setItems] = useState([]);
return (
@@ -125,7 +127,7 @@ const StatisticsPage = () => {
<TableCell>{item.mailSent}</TableCell>
<TableCell>{item.smsSent}</TableCell>
<TableCell>{item.geocoderRequests}</TableCell>
- <TableCell>{item.geolocationRequests}</TableCell>
+ <TableCell>{item.geolocationRequests}</TableCell>
</TableRow>
))}
</TableBody>
@@ -133,6 +135,6 @@ const StatisticsPage = () => {
</TableContainer>
</ReportLayoutPage>
);
-}
+};
export default StatisticsPage;