aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/reports/components/ReportFilter.js4
-rw-r--r--modern/src/store/reports.js4
2 files changed, 2 insertions, 6 deletions
diff --git a/modern/src/reports/components/ReportFilter.js b/modern/src/reports/components/ReportFilter.js
index de692613..ff0dc146 100644
--- a/modern/src/reports/components/ReportFilter.js
+++ b/modern/src/reports/components/ReportFilter.js
@@ -27,7 +27,7 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore
const period = useSelector((state) => state.reports.period);
const from = useSelector((state) => state.reports.from);
const to = useSelector((state) => state.reports.to);
- const button = useSelector((state) => state.reports.button);
+ const [button, setButton] = useState('json');
const [description, setDescription] = useState();
const [calendarId, setCalendarId] = useState();
@@ -204,7 +204,7 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore
disabled={disabled}
onClick={handleClick}
selected={button}
- setSelected={(value) => dispatch(reportsActions.updateButton(value))}
+ setSelected={(value) => setButton(value)}
options={readonly ? {
json: t('reportShow'),
export: t('reportExport'),
diff --git a/modern/src/store/reports.js b/modern/src/store/reports.js
index 870a0420..9834c8b8 100644
--- a/modern/src/store/reports.js
+++ b/modern/src/store/reports.js
@@ -8,7 +8,6 @@ const { reducer, actions } = createSlice({
period: 'today',
from: moment().subtract(1, 'hour').locale('en').format(moment.HTML5_FMT.DATETIME_LOCAL),
to: moment().locale('en').format(moment.HTML5_FMT.DATETIME_LOCAL),
- button: 'json',
},
reducers: {
updateGroupIds(state, action) {
@@ -23,9 +22,6 @@ const { reducer, actions } = createSlice({
updateTo(state, action) {
state.to = action.payload;
},
- updateButton(state, action) {
- state.button = action.payload;
- },
},
});