feat(inventory item & valuation): warehouse multi select.

This commit is contained in:
elforjani13
2022-02-17 20:30:16 +02:00
parent cd663d99b7
commit 7a27ea9a65
13 changed files with 324 additions and 53 deletions

View File

@@ -7,6 +7,7 @@ import { Tabs, Tab, Button, Intent } from '@blueprintjs/core';
import FinancialStatementHeader from 'containers/FinancialStatements/FinancialStatementHeader';
import InventoryValuationHeaderGeneralPanel from './InventoryValuationHeaderGeneralPanel';
import InventoryValuationHeaderDimensionsPanel from './InventoryValuationHeaderDimensionsPanel';
import withInventoryValuation from './withInventoryValuation';
import withInventoryValuationActions from './withInventoryValuationActions';
@@ -36,13 +37,18 @@ function InventoryValuationHeader({
...pageFilter,
asDate: moment().toDate(),
itemsIds: [],
warehousesIds: [],
};
// Initial values.
const initialValues = transformToForm({
...pageFilter,
...defaultValues,
asDate: moment(pageFilter.asDate).toDate(),
}, defaultValues);
const initialValues = transformToForm(
{
...pageFilter,
...defaultValues,
asDate: moment(pageFilter.asDate).toDate(),
warehousesIds: [],
},
defaultValues,
);
// Handle the form of header submit.
const handleSubmit = (values, { setSubmitting }) => {
@@ -78,6 +84,11 @@ function InventoryValuationHeader({
title={<T id={'general'} />}
panel={<InventoryValuationHeaderGeneralPanel />}
/>
<Tab
id="dimensions"
title={'Dimensions'}
panel={<InventoryValuationHeaderDimensionsPanel />}
/>
</Tabs>
<div class="financial-header-drawer__footer">
<Button className={'mr1'} intent={Intent.PRIMARY} type={'submit'}>