fix: toggle display filter drawer of financial statements.

This commit is contained in:
a.bouhuolia
2021-02-22 15:38:17 +02:00
parent 1e3b8df702
commit 2750d64fac
49 changed files with 716 additions and 1075 deletions

View File

@@ -19,10 +19,10 @@ function ProfitLossHeader({
onSubmitFilter,
// #withProfitLoss
profitLossSheetFilter,
profitLossDrawerFilter,
// #withProfitLossActions
toggleProfitLossSheetFilter,
toggleProfitLossFilterDrawer: toggleFilterDrawer,
}) {
const { formatMessage } = useIntl();
@@ -49,21 +49,21 @@ function ProfitLossHeader({
// Handle form submit.
const handleSubmit = (values, actions) => {
onSubmitFilter(values);
toggleProfitLossSheetFilter();
toggleFilterDrawer(false);
};
// Handles the cancel button click.
const handleCancelClick = () => {
toggleProfitLossSheetFilter();
toggleFilterDrawer(false);
};
// Handles the drawer close action.
const handleDrawerClose = () => {
toggleProfitLossSheetFilter();
toggleFilterDrawer(false);
};
return (
<FinancialStatementHeader
isOpen={profitLossSheetFilter}
isOpen={profitLossDrawerFilter}
drawerProps={{ onClose: handleDrawerClose }}
>
<Formik
@@ -95,8 +95,8 @@ function ProfitLossHeader({
}
export default compose(
withProfitLoss(({ profitLossSheetFilter }) => ({
profitLossSheetFilter,
withProfitLoss(({ profitLossDrawerFilter }) => ({
profitLossDrawerFilter,
})),
withProfitLossActions,
)(ProfitLossHeader);