mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Merge remote-tracking branch 'origin/fix_connectors'
This commit is contained in:
@@ -6,7 +6,7 @@ import Money from 'components/Money';
|
||||
import FinancialSheet from 'components/FinancialSheet';
|
||||
import DataTable from 'components/DataTable';
|
||||
|
||||
import SettingsConnect from 'connectors/Settings.connect';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withBalanceSheetDetail from './withBalanceSheetDetail';
|
||||
import { getFinancialSheetIndexByQuery } from 'store/financialStatement/financialStatements.selectors';
|
||||
|
||||
@@ -130,5 +130,5 @@ export default compose(
|
||||
balanceSheetQuery,
|
||||
}),
|
||||
),
|
||||
SettingsConnect,
|
||||
withSettings,
|
||||
)(BalanceSheetTable);
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
import React, { useCallback} from 'react';
|
||||
import {
|
||||
Button,
|
||||
FormGroup,
|
||||
Classes,
|
||||
} from '@blueprintjs/core';
|
||||
import {Row, Col} from 'react-grid-system';
|
||||
import React, { useCallback } from 'react';
|
||||
import { Button, FormGroup, Classes } from '@blueprintjs/core';
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
import moment from 'moment';
|
||||
import * as Yup from 'yup';
|
||||
import {useFormik} from 'formik';
|
||||
import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
import AccountsMultiSelect from 'components/AccountsMultiSelect';
|
||||
import FinancialStatementHeader from 'containers/FinancialStatements/FinancialStatementHeader';
|
||||
import AccountsConnect from 'connectors/Accounts.connector'
|
||||
import withAccounts from 'containers/Accounts/withAccounts';
|
||||
|
||||
import classNames from 'classnames';
|
||||
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
||||
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
||||
import {compose} from 'utils';
|
||||
import { compose } from 'utils';
|
||||
|
||||
import withGeneralLedger from './withGeneralLedger';
|
||||
|
||||
|
||||
function GeneralLedgerHeader({
|
||||
onSubmitFilter,
|
||||
pageFilter,
|
||||
@@ -36,7 +32,7 @@ function GeneralLedgerHeader({
|
||||
initialValues: {
|
||||
...pageFilter,
|
||||
from_date: moment(pageFilter.from_date).toDate(),
|
||||
to_date: moment(pageFilter.to_date).toDate()
|
||||
to_date: moment(pageFilter.to_date).toDate(),
|
||||
},
|
||||
validationSchema: Yup.object().shape({
|
||||
from_date: Yup.date().required(),
|
||||
@@ -57,10 +53,13 @@ function GeneralLedgerHeader({
|
||||
console.log(selectedAccounts);
|
||||
}, []);
|
||||
|
||||
const handleAccountingBasisChange = useCallback((value) => {
|
||||
formik.setFieldValue('basis', value);
|
||||
}, [formik]);
|
||||
|
||||
const handleAccountingBasisChange = useCallback(
|
||||
(value) => {
|
||||
formik.setFieldValue('basis', value);
|
||||
},
|
||||
[formik],
|
||||
);
|
||||
|
||||
return (
|
||||
<FinancialStatementHeader show={generalLedgerSheetFilter}>
|
||||
<FinancialStatementDateRange formik={formik} />
|
||||
@@ -68,18 +67,20 @@ function GeneralLedgerHeader({
|
||||
<Row>
|
||||
<Col sm={3}>
|
||||
<FormGroup
|
||||
label={<T id={'specific_accounts'}/>}
|
||||
label={<T id={'specific_accounts'} />}
|
||||
className={classNames('form-group--select-list', Classes.FILL)}
|
||||
>
|
||||
<AccountsMultiSelect
|
||||
accounts={accounts}
|
||||
onAccountSelected={onAccountSelected} />
|
||||
onAccountSelected={onAccountSelected}
|
||||
/>
|
||||
</FormGroup>
|
||||
</Col>
|
||||
<Col sm={3}>
|
||||
<RadiosAccountingBasis
|
||||
onChange={handleAccountingBasisChange}
|
||||
selectedValue={formik.values.basis} />
|
||||
selectedValue={formik.values.basis}
|
||||
/>
|
||||
</Col>
|
||||
|
||||
<Col sm={3}>
|
||||
@@ -87,16 +88,21 @@ function GeneralLedgerHeader({
|
||||
type="submit"
|
||||
onClick={handleSubmitClick}
|
||||
disabled={formik.isSubmitting}
|
||||
className={'button--submit-filter mt2'}>
|
||||
<T id={'calculate_report'}/>
|
||||
className={'button--submit-filter mt2'}
|
||||
>
|
||||
<T id={'calculate_report'} />
|
||||
</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
</FinancialStatementHeader>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(
|
||||
AccountsConnect,
|
||||
withGeneralLedger(({ generalLedgerSheetFilter }) => ({ generalLedgerSheetFilter })),
|
||||
)(GeneralLedgerHeader);
|
||||
withAccounts(({ accounts }) => ({
|
||||
accounts,
|
||||
})),
|
||||
withGeneralLedger(({ generalLedgerSheetFilter }) => ({
|
||||
generalLedgerSheetFilter,
|
||||
})),
|
||||
)(GeneralLedgerHeader);
|
||||
|
||||
@@ -10,7 +10,8 @@ import JournalHeader from './JournalHeader';
|
||||
import JournalActionsBar from './JournalActionsBar';
|
||||
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
|
||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||
import SettingsConnect from 'connectors/Settings.connect';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
|
||||
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
import withJournalActions from './withJournalActions';
|
||||
@@ -95,5 +96,5 @@ function Journal({
|
||||
export default compose(
|
||||
withDashboardActions,
|
||||
withJournalActions,
|
||||
SettingsConnect,
|
||||
withSettings,
|
||||
)(Journal);
|
||||
|
||||
@@ -13,7 +13,8 @@ import DashboardPageContent from 'components/Dashboard/DashboardPageContent'
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
import withProfitLossActions from './withProfitLossActions';
|
||||
import withProfitLoss from './withProfitLoss';
|
||||
import SettingsConnect from 'connectors/Settings.connect';
|
||||
// import SettingsConnect from 'connectors/Settings.connect';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
|
||||
|
||||
function ProfitLossSheet({
|
||||
@@ -90,5 +91,5 @@ export default compose(
|
||||
withProfitLoss(({ profitLossSheetLoading }) => ({
|
||||
profitLossSheetLoading,
|
||||
})),
|
||||
SettingsConnect,
|
||||
withSettings,
|
||||
)(ProfitLossSheet);
|
||||
Reference in New Issue
Block a user