mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
BIG-55: fix customize report in inventory valuation report not working. BIG-56: fix customize report in Inventory item details report not working.
62 lines
1.7 KiB
JavaScript
62 lines
1.7 KiB
JavaScript
import React from 'react';
|
|
import { Field } from 'formik';
|
|
import classNames from 'classnames';
|
|
import { Classes, FormGroup } from '@blueprintjs/core';
|
|
|
|
import FinancialStatementDateRange from '../FinancialStatementDateRange';
|
|
import {
|
|
Row,
|
|
Col,
|
|
ContactsMultiSelect,
|
|
FormattedMessage as T,
|
|
} from 'components';
|
|
import {
|
|
VendorsTransactionsGeneralPanelProvider,
|
|
useVendorsTransactionsGeneralPanelContext,
|
|
} from './VendorsTransactionsHeaderGeneralPanelProvider';
|
|
|
|
/**
|
|
* Vendors transactions header - General panel
|
|
*/
|
|
export default function VendorsTransactionsHeaderGeneralPanel() {
|
|
return (
|
|
<VendorsTransactionsGeneralPanelProvider>
|
|
<VendorsTransactionsHeaderGeneralPanelContent />
|
|
</VendorsTransactionsGeneralPanelProvider>
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Vendors transactions header - General panel - Content.
|
|
*/
|
|
function VendorsTransactionsHeaderGeneralPanelContent() {
|
|
const { vendors } = useVendorsTransactionsGeneralPanelContext();
|
|
|
|
return (
|
|
<div>
|
|
<FinancialStatementDateRange />
|
|
|
|
<Row>
|
|
<Col xs={5}>
|
|
<Field name={'vendorsIds'}>
|
|
{({ form: { setFieldValue }, field: { value } }) => (
|
|
<FormGroup
|
|
label={<T id={'specific_vendors'} />}
|
|
className={classNames('form-group--select-list', Classes.FILL)}
|
|
>
|
|
<ContactsMultiSelect
|
|
onContactSelect={(contactsIds) => {
|
|
setFieldValue('vendorsIds', contactsIds);
|
|
}}
|
|
contacts={vendors}
|
|
contactsSelected={value}
|
|
/>
|
|
</FormGroup>
|
|
)}
|
|
</Field>
|
|
</Col>
|
|
</Row>
|
|
</div>
|
|
);
|
|
}
|