BIG-3: refactoring financial reports filtering.

This commit is contained in:
elforjani13
2021-09-25 21:17:17 +02:00
parent 010b660318
commit cd5116dbcb
30 changed files with 188 additions and 185 deletions

View File

@@ -27,6 +27,7 @@ function InventoryValuation({
}) {
const [filter, setFilter] = useState({
asDate: moment().endOf('day').format('YYYY-MM-DD'),
filterByOption: 'with-transactions',
});
// Handle filter form submit.
@@ -54,7 +55,6 @@ function InventoryValuation({
[toggleInventoryValuationFilterDrawer],
);
return (
<InventoryValuationProvider query={filter}>
<InventoryValuationActionsBar

View File

@@ -11,7 +11,7 @@ import {
Col,
FieldHint,
} from '../../../components';
import { filterInventoryValuationOptions } from '../common';
import { filterInventoryValuationOptions } from '../constants';
import {
momentFormatter,
@@ -45,7 +45,7 @@ function InventoryValuationHeaderGeneralPanelContent() {
return (
<div>
<Row>
<Col xs={5}>
<Col xs={4}>
<FastField name={'asDate'}>
{({ form, field: { value }, meta: { error } }) => (
<FormGroup
@@ -76,7 +76,7 @@ function InventoryValuationHeaderGeneralPanelContent() {
/>
<Row>
<Col xs={5}>
<Col xs={4}>
<Field name={'itemsIds'}>
{({ form: { setFieldValue } }) => (
<FormGroup