import React from 'react'; import { FormGroup, Intent, InputGroup, Classes } from '@blueprintjs/core'; import { AccountsSelectList, ErrorMessage, Col, Row } from 'components'; import { FormattedMessage as T } from 'react-intl'; import classNames from 'classnames'; import withAccounts from 'containers/Accounts/withAccounts'; import { compose } from 'utils'; /** * Item form inventory sections. */ function ItemFormInventorySection({ errors, touched, setFieldValue, values, getFieldProps, accountsList, }) { return (

{/*------------- Inventory account ------------- */} } inline={true} intent={ errors.inventory_account_id && touched.inventory_account_id && Intent.DANGER } helperText={ } className={classNames( 'form-group--item-inventory_account', 'form-group--select-list', Classes.FILL, )} > { setFieldValue('inventory_account_id', account.id); }} defaultSelectText={} selectedAccountId={values.inventory_account_id} /> } className={'form-group--item-stock'} inline={true} >
); } export default compose( withAccounts(({ accountsList }) => ({ accountsList, })), )(ItemFormInventorySection);