WIP / exchangeRate / localize

This commit is contained in:
elforjani3
2020-05-10 20:44:23 +02:00
parent e590a21740
commit cceb4786c2
55 changed files with 2339 additions and 971 deletions

View File

@@ -0,0 +1,31 @@
import { connect } from 'react-redux';
import { compose } from 'utils';
import DialogConnect from 'connectors/Dialog.connector';
import DialogReduxConnect from 'components/DialogReduxConnect';
import withExchangeRatesActions from 'containers/FinancialStatements/ExchangeRates/withExchangeRatesActions';
import withExchangeRates from 'containers/FinancialStatements/ExchangeRates/withExchangeRates';
import { getDialogPayload } from 'store/dashboard/dashboard.reducer';
import CurrencyFromDialogConnect from 'connectors/CurrencyFromDialog.connect';
export const mapStateToProps = (state, props) => {
const dialogPayload = getDialogPayload(state, 'exchangeRate-form');
return {
exchangeRatesList: Object.values(state.exchangeRates.exchangeRates),
name: 'exchangeRate-form',
payload: { action: 'new', id: null, ...dialogPayload },
editExchangeRate:
dialogPayload && dialogPayload.action === 'edit'
? state.exchangeRates.exchangeRates[dialogPayload.id]
: {},
};
};
const ExchangeRatesDialogConnect = connect(mapStateToProps);
export default compose(
CurrencyFromDialogConnect,
ExchangeRatesDialogConnect,
withExchangeRatesActions,
withExchangeRates,
DialogReduxConnect,
DialogConnect
);