From 9200986d36b88f549ed40606246d4ef08c93f18f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 8 Jul 2022 16:52:45 -0700 Subject: Improve reports handling --- modern/src/reports/components/ReportFilter.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'modern/src/reports/components') diff --git a/modern/src/reports/components/ReportFilter.js b/modern/src/reports/components/ReportFilter.js index 100dab90..07c406d6 100644 --- a/modern/src/reports/components/ReportFilter.js +++ b/modern/src/reports/components/ReportFilter.js @@ -24,7 +24,7 @@ const ReportFilter = ({ children, handleSubmit, showOnly, ignoreDevice, multiDev const disabled = !ignoreDevice && !deviceId && !deviceIds.length && !groupIds.length; - const handleClick = (mail, json) => { + const handleClick = (type) => { let selectedFrom; let selectedTo; switch (period) { @@ -58,15 +58,13 @@ const ReportFilter = ({ children, handleSubmit, showOnly, ignoreDevice, multiDev break; } - const accept = json ? 'application/json' : 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; handleSubmit({ deviceId, deviceIds, groupIds, from: selectedFrom.toISOString(), to: selectedTo.toISOString(), - mail, - headers: { Accept: accept }, + type, }); }; @@ -145,7 +143,7 @@ const ReportFilter = ({ children, handleSubmit, showOnly, ignoreDevice, multiDev {children}
{!showOnly && (