mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
BC-4: feat: base currency withCurrentOrganization
This commit is contained in:
@@ -24,7 +24,7 @@ import EstimatesEmptyStatus from './EstimatesEmptyStatus';
|
||||
import { statusAccessor } from './components';
|
||||
import withEstimates from './withEstimates';
|
||||
import withEstimateActions from './withEstimateActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withCurrentOrganization from 'containers/Organization/withCurrentOrganization';
|
||||
|
||||
// Estimates transactions datatable.
|
||||
function EstimatesDataTable({
|
||||
@@ -38,8 +38,8 @@ function EstimatesDataTable({
|
||||
// #withEstimatesActions
|
||||
addEstimatesTableQueries,
|
||||
|
||||
// #withSettings
|
||||
baseCurrency,
|
||||
// #withCurrentOrganization
|
||||
organization: { base_currency },
|
||||
|
||||
// #ownProps
|
||||
onEditEstimate,
|
||||
@@ -50,7 +50,6 @@ function EstimatesDataTable({
|
||||
onDrawerEstimate,
|
||||
onSelectedRowsChange,
|
||||
}) {
|
||||
|
||||
const isLoaded = useIsValuePassed(estimatesLoading, false);
|
||||
|
||||
const handleEditEstimate = useCallback(
|
||||
@@ -171,7 +170,7 @@ function EstimatesDataTable({
|
||||
{
|
||||
id: 'amount',
|
||||
Header: intl.get('amount'),
|
||||
accessor: (r) => <Money amount={r.amount} currency={baseCurrency} />,
|
||||
accessor: (r) => <Money amount={r.amount} currency={base_currency} />,
|
||||
|
||||
width: 140,
|
||||
className: 'amount',
|
||||
@@ -293,7 +292,5 @@ export default compose(
|
||||
estimatesCurrentViewId,
|
||||
}),
|
||||
),
|
||||
withSettings(({ organizationSettings }) => ({
|
||||
baseCurrency: organizationSettings?.baseCurrency,
|
||||
})),
|
||||
withCurrentOrganization(),
|
||||
)(EstimatesDataTable);
|
||||
|
||||
Reference in New Issue
Block a user