diff options
Diffstat (limited to 'modern/src/reports/SummaryReportPage.js')
-rw-r--r-- | modern/src/reports/SummaryReportPage.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/modern/src/reports/SummaryReportPage.js b/modern/src/reports/SummaryReportPage.js index c90ddb4a..4cb37aaa 100644 --- a/modern/src/reports/SummaryReportPage.js +++ b/modern/src/reports/SummaryReportPage.js @@ -11,12 +11,7 @@ const ReportFilterForm = ({ onResult }) => { const [daily, setDaily] = useState(false); const handleSubmit = async (deviceId, from, to) => { - const query = new URLSearchParams({ - deviceId, - from: from.toISOString(), - to: to.toISOString(), - daily - }); + const query = new URLSearchParams({ deviceId, from, to, daily }); const response = await fetch(`/api/reports/summary?${query.toString()}`, { headers: { Accept: 'application/json' } }); if (response.ok) { onResult(await response.json()); @@ -25,7 +20,7 @@ const ReportFilterForm = ({ onResult }) => { return ( <ReportFilter handleSubmit={handleSubmit}> <FormControlLabel - control={<Checkbox checked={daily} onChange={event => setDaily(event.target.checked)} />} + control={<Checkbox checked={daily} onChange={e => setDaily(e.target.checked)} />} label={t('reportDaily')} /> </ReportFilter> ); |